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 gvanrossum
Recipients amaury.forgeotdarc, daniel.urban, fdrake, gvanrossum, isoschiz, kristjan.jonsson, ncoghlan, pconnell, pitrou
Date 2013-05-13.18:47:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368470833.86.0.778335897202.issue17950@psf.upfronthosting.co.za>
In-reply-to
Content
I think turning the __mro__ tuple into a getter is fine.  As long as this works I'm okay:

class C: ...
mro = C.__mro__
del C
assert mro[0].__name__ == 'C'

(The last assert stands in for asserting that the class object must stay alive as long as the tuple returned by __mro__ is alive.)

I think it's also fine if the descriptors contain weak references.  Its hard to get a "raw" descriptor anyways -- you can't say C.desc, you'd have to say C.__dict__['desc'].
History
Date User Action Args
2013-05-13 18:47:13gvanrossumsetrecipients: + gvanrossum, fdrake, amaury.forgeotdarc, ncoghlan, pitrou, kristjan.jonsson, daniel.urban, pconnell, isoschiz
2013-05-13 18:47:13gvanrossumsetmessageid: <1368470833.86.0.778335897202.issue17950@psf.upfronthosting.co.za>
2013-05-13 18:47:13gvanrossumlinkissue17950 messages
2013-05-13 18:47:13gvanrossumcreate