[Python-Dev] Duck-typing self (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Thu Feb 19 02:48:51 CET 2009
- Previous message: [Python-Dev] Duck-typing self
- Next message: [Python-Dev] Duck-typing self
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 imfunc 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
- Previous message: [Python-Dev] Duck-typing self
- Next message: [Python-Dev] Duck-typing self
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]