Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'programmer': 0.03; 'operator': 0.03; 'preferably': 0.05; 'url:pipermail': 0.05; 'subject:Python': 0.06; 'attribute': 0.07; 'differently': 0.07; 'nasty': 0.07; 'arguments': 0.09; 'arguments,': 0.09; 'consistency': 0.09; 'developer': 0.10; 'python': 0.11; 'bug': 0.12; 'suggest': 0.14; '"python"': 0.16; 'behave': 0.16; 'callable': 0.16; 'cet': 0.16; 'illusion': 0.16; 'nicolas': 0.16; 'received:192.168.1.4': 0.16; 'ternary': 0.16; 'wrote:': 0.18; 'possible,': 0.19; 'replacing': 0.19; '>>>': 0.22; 'saying': 0.22; 'header:User-Agent:1': 0.23; 'him.': 0.24; 'script': 0.25; 'suggested': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'thus': 0.29; "doesn't": 0.30; 'statement': 0.30; 'asked': 0.31; 'directly,': 0.31; 'object.': 0.31; 'url:python': 0.33; 'objects': 0.35; 'url:org': 0.36; 'should': 0.36; 'ahead': 0.38; 'to:addr :python-list': 0.38; 'little': 0.38; 'explain': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'matter': 0.61; 'making': 0.63; 'finally': 0.65; 'details': 0.65; 'mar': 0.68; 'surprise': 0.74; '[python-dev]': 0.84; 'bitten': 0.84; 'difference.': 0.84; 'otten': 0.84; 'pardon': 0.84; 'received:195.238': 0.84; 'received:195.238.6': 0.84; 'received:belgacom.be': 0.84; 'received:isp.belgacom.be': 0.84; 'url:python-dev': 0.84 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAFokklJbs/Xy/2dsb2JhbAANTIM/qguSZIEzgxkBAQEEeBELGAkWDwkDAgECATMSEwgCh2sDFAisAokBA2GHUBeONgEBVhaEHQOYFIEwlAuBcA Date: Sun, 24 Nov 2013 17:08:46 +0100 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Behavior of staticmethod in Python 3 References: <5290C30D.5060604@rece.vub.ac.be> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 45 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1385309418 news.xs4all.nl 15950 [2001:888:2000:d::a6]:40130 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60386 Op 24-11-13 12:03, Peter Otten schreef: > Antoon Pardon wrote: > >> Op 23-11-13 10:01, Peter Otten schreef: >> >>> >>> Your script is saying that a staticmethod instance is not a callable >>> object. It need not be because >>> >>> Foo.foo() >>> >>> doesn't call the Foo.foo attribute directly, it calls >>> >>> Foo.foo.__get__(None, Foo)() >> >> I think you are burdening the programmer with implemantation details >> that don't matter to him. > > Replacing "you" in your statement with "python" I was about to suggest to > make staticmethod(func) callable when I found this had already been > rejected: > > [Python-Dev] Making staticmethod objects callable? > Nicolas Fleury nidoizo at yahoo.com > Wed Mar 1 15:57:12 CET 2006 > > https://mail.python.org/pipermail/python-dev/2006-March/061948.html > > If you think you have compelling arguments, go ahead and explain them -- > preferably on python-ideas. I am under no illusion that compelling arguments will make any difference. People had argued for a ternary operator for years and it all fell on deaf ears until finally a python developer was bitten by a nasty bug while using one of the alternative that was always suggested here. When you asked that python should behave following the principle of least surprise and thus showed consistency where possible, the standard trope was that a foolish consistency was the hobgoblin of little minds. I see no reason why this should go any way differently now. -- Antoon Pardon