homepage

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 serhiy.storchaka
Recipients barry, eli.bendersky, ethan.furman, ezio.melotti, martin.panter, serhiy.storchaka
Date 2015年03月08日.13:35:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425821733.96.0.171894106828.issue23591@psf.upfronthosting.co.za>
In-reply-to
Content
I choose repr() so that for single flag it looks as for IntEnum instance. Other variants except <Perm.R|Perm.W: 3> have different format. <Perm.R|Perm.W: 3> is too verbose, it repeats the same class name multiple times.
But I don't like current repr.
Other operators are not overridden for purpose. IntFlags is int and can be used in all cases when int is used, but not in all cases the result should preserve the type. FLAG1 + FLAG2 works as if flags would be ints, but it should be rewritten to FLAG1 | FLAG2 to got the benefit from using IntFlags.
However I forgot to override the exclusive-or operator. It should be overridden.
Updated patch changes str and repr, override the exclusive-or operator and adds some documentation.
History
Date User Action Args
2015年03月08日 13:35:34serhiy.storchakasetrecipients: + serhiy.storchaka, barry, ezio.melotti, eli.bendersky, ethan.furman, martin.panter
2015年03月08日 13:35:33serhiy.storchakasetmessageid: <1425821733.96.0.171894106828.issue23591@psf.upfronthosting.co.za>
2015年03月08日 13:35:33serhiy.storchakalinkissue23591 messages
2015年03月08日 13:35:33serhiy.storchakacreate

AltStyle によって変換されたページ (->オリジナル) /