A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-September/091544.html below:

[Python-Dev] why different between staticmethod and classmethod on non-callable object?

[Python-Dev] why different between staticmethod and classmethod on non-callable object? [Python-Dev] why different between staticmethod and classmethod on non-callable object?Greg Ewing greg.ewing at canterbury.ac.nz
Wed Sep 2 00:28:06 CEST 2009
Brett Cannon wrote:
> It isn't like it is checking
> explicitly for a function or method, just that it can be called which
> seems reasonable to me (unless PyCallable_Check() is as off as
> callable() was).

I think it just checks that there's something in the
tp_call slot, which is reasonable -- if it's empty,
there's no way that calling the object could ever
succeed, so you might as well fail early.

-- 
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4