<p dir="ltr">Chris, what do you want to do with the knowledge you are seeking?</p>
<p dir="ltr">--Guido van Rossum (sent from Android phone)</p>
<div class="gmail_quote">On Jul 4, 2013 4:28 AM, "Chris Withers" <<a href="mailto:chris@simplistix.co.uk">chris@simplistix.co.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
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:<br>
<br>
>>> class MyClass(object):<br>
... def method(self): pass<br>
...<br>
>>> MyClass.method<br>
<unbound method MyClass.method><br>
>>> MyClass.method.im_class<br>
<class '__main__.MyClass'><br>
<br>
There doesn't appear to be any way in Python 3 to do this, which is a little surprising and frustrating...<br>
<br>
What am I missing here?<br>
<br>
Chris<br>
<br>
-- <br>
Simplistix - Content Management, Batch Processing & Python Consulting<br>
- <a href="http://www.simplistix.co.uk" target="_blank">http://www.simplistix.co.uk</a><br>
______________________________<u></u>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/guido%40python.org" target="_blank">http://mail.python.org/<u></u>mailman/options/python-dev/<u></u>guido%40python.org</a><br>
</blockquote></div>