
July 28, 2011
10:57 a.m.
Barry Warsaw wrote:
In my experimental branch I've also made EnumValues subclasses of ints. This breaks one test in my Mailman 3 test suite, since I was using a custom encoder for json.dumps() which knew how to encode EnumValues. However, the json module doesn't allow you to override the encoding of basic types,
Isn't this a problem with json? An EnumValue is a subclass, after all, not a plain ol' straight-up int -- I would think that json should realize a subclass may be different and go the .default() route. ~Ethan~