Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #15809
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!amsnews11.chello.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.042 |
| X-Spam-Evidence | '*H*': 0.92; '*S*': 0.00; 'def': 0.14; '16,': 0.15; 'cc:addr:python-list': 0.15; 'wed,': 0.17; 'wrote:': 0.18; 'cc:no real name:2**0': 0.21; 'header:In-Reply-To:1': 0.23; 'cc:2**0': 0.25; 'pass': 0.28; 'bound': 0.28; 'cc:addr:python.org': 0.29; 'message-id:@mail.gmail.com': 0.29; 'print': 0.29; 'class': 0.29; 'received:209.85.214': 0.30; 'received:mail-bw0-f46.google.com': 0.30; 'nov': 0.31; 'pm,': 0.31; 'yet': 0.32; 'it.': 0.33; 'skip:@ 10': 0.34; 'received:google.com': 0.38; 'received:209.85': 0.38; 'define': 0.39; 'subject:: ': 0.39; 'received:209': 0.40; '2011': 0.62 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=zvd06t5ngeHQR/vEUANBeQeslL5g2T3gJ7Q+mEk0n3U=; b=hwVwotEeiy3TWZ5GAMPFA4sSp5onGCzY+XcjO9ewiTGyhSJtPJKzLh2z8+bt8qD9tY Q7gROWzuxv7ys+byypUlQarhvJkM7XM25rAFtcyeoduPf30vYps0fhUxwyFAqtd5+WtO LztfLR4cqsj4Tar+FhriRRiHlx2efod0FzMHQ= |
| MIME-Version | 1.0 |
| In-Reply-To | <CAKDXFkMZ=TLYO1sPCU1JMBkNOibchnE361_HGHCX+EbWn_GsBA@mail.gmail.com> |
| References | <roy-DD1C5B.21305716112011@news.panix.com> <CAKDXFkMZ=TLYO1sPCU1JMBkNOibchnE361_HGHCX+EbWn_GsBA@mail.gmail.com> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Thu, 17 Nov 2011 00:37:57 -0700 |
| Subject | Re: staticmethod makes my brain hurt |
| To | Dotan Cohen <dotancohen@gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2795.1321515508.27778.python-list@python.org> (permalink) |
| Lines | 12 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1321515508 news.xs4all.nl 6918 [2001:888:2000:d::a6]:60655 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:15809 |
Show key headers only | View raw
On Wed, Nov 16, 2011 at 11:44 PM, Dotan Cohen <dotancohen@gmail.com> wrote: > Try this (untested): > > class C: > @staticmethod > def foo(): > pass > > print "inside", C.foo, callable(C.foo) If you had tested this, you would have found that you get a NameError, since C is not yet bound inside the class block where you define it.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
staticmethod makes my brain hurt Roy Smith <roy@panix.com> - 2011-11-16 21:30 -0500
Re: staticmethod makes my brain hurt alex23 <wuwei23@gmail.com> - 2011-11-16 18:44 -0800
Re: staticmethod makes my brain hurt Roy Smith <roy@panix.com> - 2011-11-16 21:52 -0500
Re: staticmethod makes my brain hurt Ethan Furman <ethan@stoneleaf.us> - 2011-11-16 19:24 -0800
Re: staticmethod makes my brain hurt alex23 <wuwei23@gmail.com> - 2011-11-17 18:31 -0800
Re: staticmethod makes my brain hurt Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-11-17 04:43 +0000
Re: staticmethod makes my brain hurt Roy Smith <roy@panix.com> - 2011-11-17 00:26 -0500
Re: staticmethod makes my brain hurt Devin Jeanpierre <jeanpierreda@gmail.com> - 2011-11-17 01:20 -0500
Re: staticmethod makes my brain hurt Dotan Cohen <dotancohen@gmail.com> - 2011-11-17 08:44 +0200
Re: staticmethod makes my brain hurt Ian Kelly <ian.g.kelly@gmail.com> - 2011-11-17 00:37 -0700
Re: staticmethod makes my brain hurt Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-11-17 10:17 +0100
Re: staticmethod makes my brain hurt Dotan Cohen <dotancohen@gmail.com> - 2011-11-17 13:13 +0200
Re: staticmethod makes my brain hurt Chris Angelico <rosuav@gmail.com> - 2011-11-17 22:38 +1100
csiph-web