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 pitrou
Recipients barry, chrism, ncoghlan, pitrou, serhiy.storchaka
Date 2013-12-01.23:19:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385939966.2297.34.camel@fsol>
In-reply-to <CADiSq7cynVuOh5soq_-9cyFbt00bNfAQA3HG1qCC8t5mGJDB-g@mail.gmail.com>
Content
> The parallel API would have to be:
> 
> json.dump_bytes
> json.dumps_bytes
> json.load_bytes
> json.loads_bytes

No, only one function dump_bytes() is needed, and it would return a
bytes object ("dumps" meaning "dump string", already). loads() can be
polymorphic without creating a new function.

I don't think the functions taking file objects are used often enough to
warrant a second API to deal with binary files.

> It doesn't need to be documented as a completely separate module, it can
> just be a subsection in the json module docs with a reference to the
> relevant RFC.

It's still completely weird and unusual.

> "Namespaces are a honking great idea; let's do more of those"

And also "flat is better than nested".

Especially when you're proposing than one API be at level N, and the
other, closely related API be at level N+1.
History
Date User Action Args
2013-12-01 23:19:29pitrousetrecipients: + pitrou, barry, chrism, ncoghlan, serhiy.storchaka
2013-12-01 23:19:29pitroulinkissue19837 messages
2013-12-01 23:19:29pitroucreate