Message205023
| Author |
serhiy.storchaka |
| Recipients |
barry, chrism, ncoghlan, pitrou, serhiy.storchaka |
| Date |
2013年12月02日.16:19:03 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1386001143.57.0.27841140077.issue19837@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> Changing return type based on argument *values* is still a bad idea in
> general.
However load() and loads() do this. ;)
> It also makes it hard to plug the API in to generic code that is designed
> to work with any dump/load based serialisation protocol.
For dumps() it will be simple -- `lambda x: json.dumps(x, encoding='utf-8')`. For loads() it will be even simpler -- loads() will accept both strings and bytes.
Note that dumps() with the encoding parameter will be more 2.x compatible than current implementation. This will help in writing compatible code. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年12月02日 16:19:03 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, chrism, ncoghlan, pitrou |
| 2013年12月02日 16:19:03 | serhiy.storchaka | set | messageid: <1386001143.57.0.27841140077.issue19837@psf.upfronthosting.co.za> |
| 2013年12月02日 16:19:03 | serhiy.storchaka | link | issue19837 messages |
| 2013年12月02日 16:19:03 | serhiy.storchaka | create |
|