Path: csiph.com!usenet.pasdenom.info!gegeweb.org!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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; 'subject:skip:s 10': 0.07; 'arguments': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; 'useless': 0.09; '~ethan~': 0.09; 'python': 0.11; 'argument.': 0.16; 'c/c++.': 0.16; 'confuse': 0.16; 'record,': 0.16; 'subclasses': 0.16; 'wrote:': 0.18; 'module': 0.19; 'basically': 0.19; 'header:User- Agent:1': 0.23; 'skip': 0.24; 'post': 0.26; 'gets': 0.27; 'header :In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'implicit': 0.31; 'class': 0.32; 'knows': 0.35; 'there': 0.35; 'method': 0.36; 'useful': 0.36; 'possible': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'called': 0.40; 'received:173': 0.61; 'first': 0.61; 'subject:more': 0.64; 'received:69.56': 0.68 Date: Tue, 21 May 2013 09:30:22 -0700 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: @staticmethods called more than once References: <02f0123d-2f9e-4287-b983-cfa1db9db69c@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([173.12.184.235]) [173.12.184.235]:47615 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 5 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369155111 news.xs4all.nl 15939 [2001:888:2000:d::a6]:39408 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45677 On 05/21/2013 08:39 AM, Skip Montanaro wrote: > Don't confuse the use of "static" in Python with its use in C/C++. From a post on StackOverflow: > > A staticmethod is a method that knows nothing about the class or instance it was called on. It just gets the > arguments that were passed, no implicit first argument. It is basically useless in Python -- you can just use a > module function instead of a staticmethod. For there record, staticmethod is useful when you want to make it possible for subclasses to change behavior. -- ~Ethan~