[Python-Dev] lament for the demise of unbound methods (original) (raw)
Chris Withers chris at simplistix.co.uk
Thu Jul 4 13:21:47 CEST 2013
- Previous message: [Python-Dev] PEP 446: Add new parameters to configure the inherance of files and for non-blocking sockets
- Next message: [Python-Dev] lament for the demise of unbound methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi All,
In Python 2, I can figure out whether I have a method or a function, and, more importantly, for an unbound method, I can figure out what class the method belongs to:
class MyClass(object): ... def method(self): pass ... MyClass.method MyClass.method.im_class <class '__main__.MyClass'>
There doesn't appear to be any way in Python 3 to do this, which is a little surprising and frustrating...
What am I missing here?
Chris
-- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
- Previous message: [Python-Dev] PEP 446: Add new parameters to configure the inherance of files and for non-blocking sockets
- Next message: [Python-Dev] lament for the demise of unbound methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]