[Python-Dev] Duck-typing self
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Feb 19 02:48:51 CET 2009
Christian Heimes wrote:
> In 2.x a class objects wrap their functions in a method wrapper. The
> method wrapper does the type check. You can get around the type check by
> using the im_func attribute of the method wrapper.
You could probably also create a decorator that
gives you something behaving like an unbound
method but without the type check (implementation
details left to the reader).
--
Greg
More information about the Python-Dev
mailing list