Message191634
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. |
|
Date |
User |
Action |
Args |
2013-06-22 05:08:18 | ethan.furman | set | recipients:
+ ethan.furman, gvanrossum, barry, rhettinger, amaury.forgeotdarc, ncoghlan, pitrou, ezio.melotti, eli.bendersky, eric.snow |
2013-06-22 05:08:17 | ethan.furman | link | issue18264 messages |
2013-06-22 05:08:17 | ethan.furman | create | |
|