A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-April/052812.html below:

[Python-Dev] anonymous blocks

[Python-Dev] anonymous blocksGuido van Rossum gvanrossum at gmail.com
Thu Apr 21 17:59:43 CEST 2005
> In case my point about the difference between thunks and other
> callables (specifically decorators) slipped by, consider the
> documentation for staticmethod, which takes a callable.  All the
> staticmethod documentation says about that callable's parameters is:
>     "A static method does not receive an implicit first argument"
> Pretty simple I'd say.  Or classmethod:
>     "A class method receives the class as implicit first argument,
>      just like an instance method receives the instance."
> Again, pretty simple.  Why are these simple?  Because decorators
> generally pass on pretty much the same arguments as the callables they
> wrap.  My point was just that because thunks don't wrap other normal
> callables, they can't make such abbreviations.

You've got the special-casing backwards. It's not thinks that are
special, but staticmethod (and decorators in general) because they
take *any* callable. That's unusual -- most callable arguments have a
definite signature, think of map(), filter(), sort() and Button
callbacks.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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