> 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/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com