Author ethan.furman
Recipients amaury.forgeotdarc, barry, eli.bendersky, eric.snow, ethan.furman, ncoghlan, pitrou
Date 2013-06-19.20:15:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1371672925.54.0.894913100286.issue18264@psf.upfronthosting.co.za>
In-reply-to
Content
I was unable to find any references to previous problems with json and floats.  A quick-n-dirty patch yields the following:

--> from json import dumps, loads
--> from enum import Enum
--> class FE(float, Enum):
...   pass
... 
--> class Test(FE):
...   one = 1.0
... 
--> Test.one
<Test.one: 1.0>
--> str(Test.one)
'1.0'
--> dumps(Test.one)
'1.0'
--> loads(dumps(Test.one))
1.0

All json and enum tests are still passing.

If this is an acceptable solution I'll create a nicer patch and post for review.
History
Date User Action Args
2013-06-19 20:15:25ethan.furmansetrecipients: + ethan.furman, barry, amaury.forgeotdarc, ncoghlan, pitrou, eli.bendersky, eric.snow
2013-06-19 20:15:25ethan.furmansetmessageid: <1371672925.54.0.894913100286.issue18264@psf.upfronthosting.co.za>
2013-06-19 20:15:25ethan.furmanlinkissue18264 messages
2013-06-19 20:15:25ethan.furmancreate