18.02.14 20:16, Ethan Furman написав(ла): > This conversation wasn't in the PEP, but as I recall we decided to go > with value instead of name for json because the receiving end may not be > running Python. > > Is having json do it one way and pickle another a problem? We decided to go with value instead of name for JSON because JSON doesn't support enums, but supports integers and strings, and because enums are comparable with they values, but not with they names. >>> json.loads(json.dumps(socket.AF_INET)) == socket.AF_INET True We simply had no other choice.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4