Vedran Čačić <[email protected]> added the comment:
If it's considered to be not too backwards-incompatible, I think it would be
nice to have str different from repr. That way we can finetune what exactly we
need. But we can already do almost exactly that with *int* instead of *str*, so
it's not too compelling.
Much more important thing is the "repr as inverse of eval". Is there any way we
can have that for our own enums (as a mixin or a decorator)?
@module_global(re)
class RegexFlag(Enum):
...
It would be fantastic. :-)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40066>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com