What happened to "not every three-line function needs to be a built-in"?
This is *literally* a three-line function. And I know the proposal is not
to make it a builtin, but still... ISTM down here lies the path to PHP.

On Fri, Sep 11, 2020 at 3:16 PM Christopher Barker <python...@gmail.com>
wrote:

> I"m pretty sure this came up recently, and was pretty much rejected.
>
> Another option would be to have json.dump take a file-like-object or a
> path-like object -- there's plenty of code out there that does that.
>
> hmm.. maybe that was the version that was rejected.
>
> But I like the idea either way. it always seemed cumbersome to me to write
> the whole context manager in these kinds of cases.
>
> -CHB
>
>
>
>
>
> On Fri, Sep 11, 2020 at 2:05 PM The Nomadic Coder <
> atemysemico...@gmail.com> wrote:
>
>> Personally prefer it to be in the json module as it just feels more
>> logical. But that's just a personal choice.
>>
>> I didn't mention about dumpf as I see a previous thread that became quite
>> controversial (seems like dumps was a more common usage at that time).
>>
>> Something I forgot to mention : A (non-exact)search for this construct in
>> github (https://github.com/search?q=with+open+%3A+json.load&type=Code)
>> gives 20million+ results. Seems like it's a popular set of statements that
>> people use ...
>>
>> ----
>> The Nomadic Coder
>> _______________________________________________
>> Python-ideas mailing list -- python-ideas@python.org
>> To unsubscribe send an email to python-ideas-le...@python.org
>> https://mail.python.org/mailman3/lists/python-ideas.python.org/
>> Message archived at
>> https://mail.python.org/archives/list/python-ideas@python.org/message/R4CZ2IGLXR5NYNQDDFZZE5YB3RHD3RP6/
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
>
>
> --
> Christopher Barker, PhD
>
> Python Language Consulting
>   - Teaching
>   - Scientific Software Development
>   - Desktop GUI and Web Development
>   - wxPython, numpy, scipy, Cython
> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-le...@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/4XVZAXRXQKZKTJJAH4WHXFVQGA57YFAV/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/FRKQ36IA6OJIZHNBNA3DQ4YLJUCBDR6O/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to