Message190043
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 :) |
|
Date |
User |
Action |
Args |
2013-05-26 00:52:26 | ncoghlan | set | recipients:
+ ncoghlan, pje, pitrou, daniel.urban, lukasz.langa, python-dev |
2013-05-26 00:52:26 | ncoghlan | set | messageid: <1369529546.17.0.247745175126.issue16832@psf.upfronthosting.co.za> |
2013-05-26 00:52:26 | ncoghlan | link | issue16832 messages |
2013-05-26 00:52:25 | ncoghlan | create | |
|