homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Justin.Lebar
Recipients Justin.Lebar, docs@python, ezio.melotti, kushal.das, petri.lehtinen
Date 2012年09月28日.20:23:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348863782.0.0.180493370899.issue16057@psf.upfronthosting.co.za>
In-reply-to
Content
Ah, I see. The examples do what you think they should do, but not for the reason you think they should do it -- the JSON encoding logic calls the encoder's encode() method before calling its default() method.
I still think the examples could be improved, perhaps by adding a comment to the effect of 
 # Raises a TypeError.
before the call to JSONEncoder.default(). Explicit is better than implicit, after all. :)
Thanks for looking at this.
History
Date User Action Args
2012年09月28日 20:23:02Justin.Lebarsetrecipients: + Justin.Lebar, ezio.melotti, docs@python, petri.lehtinen, kushal.das
2012年09月28日 20:23:02Justin.Lebarsetmessageid: <1348863782.0.0.180493370899.issue16057@psf.upfronthosting.co.za>
2012年09月28日 20:23:01Justin.Lebarlinkissue16057 messages
2012年09月28日 20:23:01Justin.Lebarcreate

AltStyle によって変換されたページ (->オリジナル) /