Ethan Furman added the comment:
Guido van Rossum added the comment:
>
> Yes for float() -- but for str() it would seem redundant? (Or what's
> the context?)
If a user has
class Color(StrEnum):
red = 'ff0000'
green = '00ff00'
blue = '0000ff'
..
..
..
oh. `str()` isn't going to give is the `value`'s string, is it?
Hmmm...
Instead of calling int() or float() on an enum member, perhaps we could make
json smart enough to use the `value`? That
would also cover pure Enums.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18264>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com