Terry J. Reedy <tjre...@udel.edu> added the comment:

I like the idea of an internal REflag class with __new__, __or__, and 
__repr__==__str__. Str(re.A|re.L) might print as
"REflag: re.ASCII | re.IGNORE"
If it is *not* an int subclass, any attempt to use or mix with an int would 
raise. I checked and the doc only promises that flags can be or'ed. An __and__ 
method might be added if it were thought that people currently use & to check 
for flags set, though that is not currently promised.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11957>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to