Author ncoghlan
Recipients daniel.urban, lukasz.langa, ncoghlan, pitrou, pje, python-dev
Date 2013-05-26.00:52:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369529546.17.0.247745175126.issue16832@psf.upfronthosting.co.za>
In-reply-to
Content
The reason I switched from suggesting an attribute/property to a module level function is because we don't really support properties for process global state. That's why sys has so many getters in it - to make them properties, you would have to add a class object to act as a holder for the property.

In this case, we appear to have a singleton that could hold the property (ABCMeta), which is why my original suggestion was to use an ABCMeta attribute. However, what I realised yesterday is that because ABCMeta is a type subclass, it means the only way to make the attribute a property in the future would be to add a metametaclass to hold the property definition.

Once I realised that... "if the implementation is hard to explain, it's a bad idea" tipped me over the edge into preferring a simple module level getter function that supported exactly the use cases we care about :)
History
Date User Action Args
2013-05-26 00:52:26ncoghlansetrecipients: + ncoghlan, pje, pitrou, daniel.urban, lukasz.langa, python-dev
2013-05-26 00:52:26ncoghlansetmessageid: <1369529546.17.0.247745175126.issue16832@psf.upfronthosting.co.za>
2013-05-26 00:52:26ncoghlanlinkissue16832 messages
2013-05-26 00:52:25ncoghlancreate