This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients eric.araujo, eric.snow, ezio.melotti, gvanrossum, pitrou, vstinner
Date 2011-11-24.15:55:39
SpamBayes Score 6.3393885e-10
Marked as misclassified No
Message-id <>
You are right, I misinterpreted “use”.  I cloned the the PEP 3155 repo and ran my test script (I’ll attach it for reference) and reprs/strs are indeed "<class '__main__.A.B'>" and "<function makestrip.<locals>.strip at ...>", so this request is not obsoleted.

I’ve updated my patch to use qualnames for str(cls) and str(func).  As I reported before, if I want str(sys.exc_info) to be 'exc_info', then Python unbound methods (i.e. functions) are affected:

    <method 'update' of 'dict' objects>
    <built-in method update of dict object at ...>
    <method 'tolist' of 'array.array' objects>
    <built-in method tolist of array.array object at ...>
 →  Counter.update
    <bound method Counter.update of Counter()>
 →  Top.Nested.method  # this checks qualnames are used
    <bound method Nested.method of <__main__.Top.Nested object at ...>

It seems to me that this is not a problem: Python 3 unbound methods *are* functions.  If you decide that having str(method) unchanged for all kinds of methods is more important than giving all kinds of functions a short str, I can do it.
Date User Action Args
2011-11-24 15:55:42eric.araujosetrecipients: + eric.araujo, gvanrossum, pitrou, vstinner, ezio.melotti, eric.snow
2011-11-24 15:55:41eric.araujosetmessageid: <>
2011-11-24 15:55:41eric.araujolinkissue13224 messages
2011-11-24 15:55:40eric.araujocreate