[Python-Dev] Re: PEP 597 bikeshedding: envvar / option name.

2021-02-21 Thread Inada Naoki
Thank you for all.

I finally submit the PEP 597 with PYTHONWARNDEFAULTENCODING /
warn_default_encoding.

On Mon, Feb 15, 2021 at 2:28 PM Inada Naoki  wrote:
>
> I am updating PEP 597 to include discussions in the thread.
> Before finishing the PEP, I need to decide the option name.
>
> I used PYTHONWARNDEFAULTENCODING (envvar name) /
> warn_default_encoding (-X option and sys.flags name) before, but it
> seems too long and hard to type, easy to misspell.
>
> Currently, I use PYTHONWARNENCODING / warn_encoding, but it is not so 
> explicit.
>
> Which name is the best balance between explicitness and readability?
>
> * PYTHONWARNENCODING / warn_ecoding
> * PYTHONWARNOMITENCODING / warn_omit_encoding
> * PYTHONWARNDEFAULTENCODING / warn_default_encoding
> * Anything else
>
> Regards,
> --
> Inada Naoki  



-- 
Inada Naoki  
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/AX3YE6AM7FVV44GNQLDAFMSBWRZFWR4B/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 597 bikeshedding: envvar / option name.

2021-02-19 Thread Paul Bryan
As long as we don't encounter sys.flags.pen_is_mightier type of cases,
I guess it'll be OK. :-)

On Fri, 2021-02-19 at 12:08 +0100, Victor Stinner wrote:
> Environment variable names with underscore would be more readable,
> but
> IMO consistency with all existing names matters more:
> https://docs.python.org/dev/using/cmdline.html#environment-variables
> 
> So I prefer PYTHONWARNDEFAULTENCODING env var and
> sys.flags.warn_default_encoding attribute names.
> 
> Victor
> 
> On Fri, Feb 19, 2021 at 9:48 AM Inada Naoki 
> wrote:
> > 
> > On Mon, Feb 15, 2021 at 3:00 PM Paul Bryan  wrote:
> > > 
> > > Let the bikeshedding begin. How about with the underscores in
> > > place? More readable to my eyes.
> > > 
> > 
> > I agree with you. Although it is not consistent with existing many
> > option names, it is much more readable.
> > 
> > Ivan, Victor, what do you think? about
> > PYTHON_WARN_DEFAULT_ENCODING?
> > 
> > ---
> > Inada Naoki  
> 
> 
> 

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/6NJ3E2PNF3QZBYH57UOTCHQL4IWGTLNP/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 597 bikeshedding: envvar / option name.

2021-02-19 Thread Victor Stinner
Environment variable names with underscore would be more readable, but
IMO consistency with all existing names matters more:
https://docs.python.org/dev/using/cmdline.html#environment-variables

So I prefer PYTHONWARNDEFAULTENCODING env var and
sys.flags.warn_default_encoding attribute names.

Victor

On Fri, Feb 19, 2021 at 9:48 AM Inada Naoki  wrote:
>
> On Mon, Feb 15, 2021 at 3:00 PM Paul Bryan  wrote:
> >
> > Let the bikeshedding begin. How about with the underscores in place? More 
> > readable to my eyes.
> >
>
> I agree with you. Although it is not consistent with existing many
> option names, it is much more readable.
>
> Ivan, Victor, what do you think? about PYTHON_WARN_DEFAULT_ENCODING?
>
> ---
> Inada Naoki  



-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/SVSPIQFLTLDAYXP3PUXI3F4JZYOB6472/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 597 bikeshedding: envvar / option name.

2021-02-19 Thread Inada Naoki
On Mon, Feb 15, 2021 at 3:00 PM Paul Bryan  wrote:
>
> Let the bikeshedding begin. How about with the underscores in place? More 
> readable to my eyes.
>

I agree with you. Although it is not consistent with existing many
option names, it is much more readable.

Ivan, Victor, what do you think? about PYTHON_WARN_DEFAULT_ENCODING?

---
Inada Naoki  
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/TN4UE2WRKA3F6BBS7TYEYMBRSARYIUQM/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 597 bikeshedding: envvar / option name.

2021-02-15 Thread Victor Stinner
On Mon, Feb 15, 2021 at 6:31 AM Inada Naoki  wrote:
> * PYTHONWARNENCODING / warn_ecoding

(I love this "ecoding" typo, but it's not my favorite choice ;-))

I dislike "warn_encoding" because it is too generic. An encoding?
Which one? Why does anyone want to emit a warning when an encoding is
used? Ah, only when it's not specified?

> * PYTHONWARNOMITENCODING / warn_omit_encoding
> * PYTHONWARNDEFAULTENCODING / warn_default_encoding

IMO this name describes exactly what the PEP 597 purpose. It can be
read aloud: "emit a warning when the default encoding is used".

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/HJH2FE2KUOXKZ4ZUJTZ4HXMTXHXOQU4E/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 597 bikeshedding: envvar / option name.

2021-02-14 Thread Ivan Pozdeev via Python-Dev

I see plenty of envvars with similarly long names at 
https://docs.python.org/3/using/cmdline.html .

So your initial name "PYTHONWARNDEFAULTENCODING" LGTM.

The first intuitive choice is often the right one ('cuz it's, well, intuitive).

On 15.02.2021 8:28, Inada Naoki wrote:

I am updating PEP 597 to include discussions in the thread.
Before finishing the PEP, I need to decide the option name.

I used PYTHONWARNDEFAULTENCODING (envvar name) /
warn_default_encoding (-X option and sys.flags name) before, but it
seems too long and hard to type, easy to misspell.

Currently, I use PYTHONWARNENCODING / warn_encoding, but it is not so explicit.

Which name is the best balance between explicitness and readability?

* PYTHONWARNENCODING / warn_ecoding
* PYTHONWARNOMITENCODING / warn_omit_encoding
* PYTHONWARNDEFAULTENCODING / warn_default_encoding
* Anything else

Regards,


--
Regards,
Ivan
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/2T2O2CNK4CQ67G4MZ2BT5KS26EWQEMY4/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 597 bikeshedding: envvar / option name.

2021-02-14 Thread Paul Bryan
Let the bikeshedding begin. How about with the underscores in place?
More readable to my eyes.

On Mon, 2021-02-15 at 14:28 +0900, Inada Naoki wrote:
> I am updating PEP 597 to include discussions in the thread.
> Before finishing the PEP, I need to decide the option name.
> 
> I used PYTHONWARNDEFAULTENCODING (envvar name) /
> warn_default_encoding (-X option and sys.flags name) before, but it
> seems too long and hard to type, easy to misspell.
> 
> Currently, I use PYTHONWARNENCODING / warn_encoding, but it is not so
> explicit.
> 
> Which name is the best balance between explicitness and readability?
> 
> * PYTHONWARNENCODING / warn_ecoding
> * PYTHONWARNOMITENCODING / warn_omit_encoding
> * PYTHONWARNDEFAULTENCODING / warn_default_encoding
> * Anything else
> 
> Regards,

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/G6JFTBOKIP23GTCNZBGX42N7RQASRO63/
Code of Conduct: http://python.org/psf/codeofconduct/