Message197611
The use case for this is that when you are in a template and you want to use the Enum instances in a conditional, then you need to pass the Enum class to the template or start using someenumvariable.__class__.someenumvalue. Instead it would be useful to be able to do someenumvariable.someenumvalue. Implimenting as __getattr__ on enum class allows real attributes to take precedence and also allows for overriding of behaviour in child classes. |
|
Date |
User |
Action |
Args |
2013-09-13 16:55:43 | lambacck | set | recipients:
+ lambacck |
2013-09-13 16:55:43 | lambacck | set | messageid: <1379091343.71.0.460469461761.issue19011@psf.upfronthosting.co.za> |
2013-09-13 16:55:43 | lambacck | link | issue19011 messages |
2013-09-13 16:55:43 | lambacck | create | |
|