Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed5.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.052 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:method': 0.09; '"test"': 0.16; 'a()': 0.16; 'btw:': 0.16; 'out?': 0.16; 'subject:instance': 0.16; 'cc:addr:python-list': 0.16; 'question.': 0.16; 'wrote:': 0.18; 'instance': 0.18; 'cheers,': 0.20; 'maybe': 0.21; 'header:In-Reply-To:1': 0.22; 'static': 0.24; 'cc:2**0': 0.26; 'figure': 0.26; "i'm": 0.28; 'class': 0.29; 'problem': 0.29; 'cc:addr:python.org': 0.29; 'invoke': 0.30; 'message-id:@gmail.com': 0.31; 'quite': 0.31; 'actually': 0.31; 'does': 0.32; 'it.': 0.33; 'curious': 0.34; 'received:209.85.160': 0.36; 'question': 0.36; 'charset:us-ascii': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'received:192': 0.38; 'received:209.85.160.46': 0.39; 'received :mail-pw0-f46.google.com': 0.39; 'subject:how': 0.39; 'received:209': 0.39; 'header:Message-Id:1': 0.62; 'here.': 0.64; 'cause': 0.67; 'cameron': 0.77; 'serious': 0.78; 'mr.': 0.85; 'subject:tell': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=AWPqJoqvfTdyWqBLaxy7gOBb7j9H8ffrtA3s+LWtZhE=; b=hpHvLLsbi1DoS8jzLN8FT71Y9OFmsR2GIck+TkqZbNsyhxv11PnAdgKWxFmgckQ2SN TZa5nPlTBsf8NT+nDw/n6SGEINfQwGNfWztzQe3hukHKHZE1UYsir4UyogdAC8PpmmwQ 91iBfDg3c2V4KDtwiihA1C6F5gRz0wIPFeP2k= Subject: Re: how to tell a method is classmethod or static method or instance method Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Zheng Li In-Reply-To: <20120213072339.GA9132@cskk.homeip.net> Date: Tue, 14 Feb 2012 13:13:59 +0900 Content-Transfer-Encoding: quoted-printable References: <20120213072339.GA9132@cskk.homeip.net> To: Cameron Simpson X-Mailer: Apple Mail (2.1257) Cc: python-list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1329192844 news.xs4all.nl 6851 [2001:888:2000:d::a6]:52590 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20387 I can get "method1" of class "Test" by a =3D getattr(Test, "method1") and I also want know how to invoke it a() or a(Test()) BTW: I don't see what the problem is if I ask a question just because I am = curious about it. On 2012/02/13, at 16:23, Cameron Simpson wrote: > On 13Feb2012 15:59, Zheng Li wrote: > | how to tell a method is class method or static method or instance = method? >=20 > Maybe a better question is: > under what circumstances do you need to figure this out?=20 >=20 > I'm actually quite serious here. Please outline what circumstances = cause > you to want to ask and answer this question. >=20 > Cheers, > --=20 > Cameron Simpson DoD#743 > http://www.cskk.ezoshosting.com/cs/ >=20 > Reason #173 to fear technology: >=20 > o o o o o o > ^|\ ^|^ v|^ v|v |/v |X| \| | > /\ >\ /< >\ /< >\ /< >\ >=20 > o> o o o o o o o > \ x <\> <)> |\ > /< >\ /< >\ /< >\ >> L >=20 > Mr. email does the Macarena.