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 magu
Recipients ethan.furman, magu, mdk, serhiy.storchaka
Date 2017-03-01.19:05:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488395157.6.0.164229040904.issue29594@psf.upfronthosting.co.za>
In-reply-to
Content
@ethan, didn't know about aenum, thanks for showing it to me. However it doesn't seem to support the behavior I'm after (or I'm doing something wrong)

import aenum

try:
	class Foo(aenum.Flag):
		a = aenum.auto()
		b = a | aenum.auto()
except Exception as err:
	print(err)

try:
	class Bar(aenum.Flag):
		a = aenum.auto()
		b = aenum.auto() | a
except Exception as err:
	print(err)

results in 
unsupported operand type(s) for |: 'int' and 'auto'
exceptions must derive from BaseException

where the latter might be a bug in the implementation.


I do realize that I'm stuck with this for the moment. My motivation with opening this thread was that I was wondering if such a feature would be worthwhile for the community. In case there is interest in this feature I would try to run the unit test and follow all the steps to try to push it through. However I save myself the work in case the community decides that the implementation is not worth it. Which would also be fine with me, as I monkey patched it for my code - so no problem on my end.
History
Date User Action Args
2017-03-01 19:05:57magusetrecipients: + magu, ethan.furman, serhiy.storchaka, mdk
2017-03-01 19:05:57magusetmessageid: <1488395157.6.0.164229040904.issue29594@psf.upfronthosting.co.za>
2017-03-01 19:05:57magulinkissue29594 messages
2017-03-01 19:05:57magucreate