Re: Metaclasses and classproperties

2019-09-10 Thread Eko palypse
Thank you for your thoughts. I'm trying to migrating en existing python2 api, which has been build using boost::python with pure python3 code. All of the py2 classes do have these additional properties names and values. You are right, using dict(Ordinal.__members__) for names could have been used

Re: Metaclasses and classproperties

2019-09-10 Thread Peter Otten
Eko palypse wrote: > I'm fairly new when it comes to metaclass programming and therefore the > question whether the following makes sense or not. > > The goal is to have two additional class properties which return a > dictionary name:class_attribute and value:class_attribute for an IntEnum > cla

Metaclasses and classproperties

2019-09-10 Thread Eko palypse
I'm fairly new when it comes to metaclass programming and therefore the question whether the following makes sense or not. The goal is to have two additional class properties which return a dictionary name:class_attribute and value:class_attribute for an IntEnum class and after reading about it I