Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'static': 0.03; 'classes.': 0.07; 'modules.': 0.09; 'python': 0.11; 'syntax': 0.13; 'java,': 0.15; '11:19': 0.16; 'singleton': 0.16; 'wrote:': 0.16; 'basically': 0.18; 'exists': 0.18; 'language': 0.19; '>>>': 0.20; '(or': 0.21; 'am,': 0.23; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'feature': 0.24; 'message-id:@mail.gmail.com': 0.28; "i'm": 0.29; 'them?': 0.29; 'guess': 0.29; 'themselves': 0.29; 'classes': 0.30; 'class.': 0.31; 'fri,': 0.31; 'code': 0.31; 'anyone': 0.32; 'class': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'subject:?': 0.34; 'received:google.com': 0.34; 'to:addr:python-list': 0.35; 'instance': 0.35; 'but': 0.36; 'there': 0.36; 'subject:" ': 0.36; 'subject:: ': 0.37; 'tue,': 0.38; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'where': 0.40; 'why': 0.40; 'term': 0.60; 'special': 0.72; 'ostensibly': 0.84; 'subject:self': 0.84; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=l/VOTRExqMgpI0ozzBRbf3sVX0VKjTCbL9LlhbW5BcM=; b=LHqRQNxJ+dUGN3isTFf73CI8WW/i1TlL4acQ068IjFs/bpaUb2/swfi6RecsRTquDq PDFEtHYgSmSZioIerX3amX+TaCPvdaNCW62sMHQS3X3/y4pEhTFTo3/zdshQijU5WpOm y9ZMUsFQQfNEX+Ksc2yWbad0DfoNwxTyoWkj91Qe87FwLPfszrYLVTH6vlyTDyEj5Wq2 0SEww/dzfWBhZBYZWno76a/P40MI5mDElQVXoCHk8jgpd998mXlpWi+55EasJzoZSGUl DLEosP+jg9jbkdCSUDpU8zRTcCf/Jy0RnQjEh8+PhcGC8AdqDbknjePyGZVSneQC3dyG 0tFA== X-Received: by 10.50.25.162 with SMTP id d2mr13592032igg.11.1433295612200; Tue, 02 Jun 2015 18:40:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87mw0i6n9i.fsf@elektro.pacujo.net> References: <551c8229-f426-45f0-a0ee-fdad1b161f59@googlegroups.com> <877frvf7f2.fsf@elektro.pacujo.net> <9f9498a5-8291-4347-aef2-ada324bb47a7@googlegroups.com> <87r3q3dqju.fsf@elektro.pacujo.net> <87siagagpx.fsf@elektro.pacujo.net> <5567c840$0$12998$c3e8da3$5496439d@news.astraweb.com> <556ddef1$0$13004$c3e8da3$5496439d@news.astraweb.com> <87mw0i6n9i.fsf@elektro.pacujo.net> From: Ian Kelly Date: Tue, 2 Jun 2015 19:39:31 -0600 Subject: Re: should "self" be changed? To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433295614 news.xs4all.nl 2926 [2001:888:2000:d::a6]:56378 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91917 On Tue, Jun 2, 2015 at 11:19 AM, Marko Rauhamaa wrote: > Steven D'Aprano : > >> On Fri, 29 May 2015 12:00 pm, Steven D'Aprano wrote: >> >> [...] >>> in a language where classes are >>> themselves values, there is no reason why a class must be instantiated, >>> particularly if you're only using a single instance of the class. Anyone >>> ever come across a named design pattern that involves using classes >>> directly without instantiating them? >>> >>> I'm basically looking for a less inelegant term for "instanceless class" >>> -- not so much a singleton as a zeroton. >> >> C# has these, and calls them static classes. > > I guess Python has them, too, and calls them modules. Indeed. I find it amusing that C# has special syntax to work around what is ostensibly a design feature -- that all code must be contained in a class (or struct). But then, the same practice also exists in Java, where there is no specific syntax for it.