[Python-ideas] Re: Allowing -b (BytesWarning) to be activated in other ways

2020-07-16 Thread Christian Heimes
On 16/07/2020 16.38, Shai Berger wrote: > Hi Pythonistas, > > The -b flag, which turns on checks which emit BytesWarnings on > operations mixing bytes and str objects, is very useful. > > However, the only way to set this flag is via the Python invocation. > This limits its usability in contexts

[Python-ideas] Re: Allowing -b (BytesWarning) to be activated in other ways

2020-07-16 Thread Serhiy Storchaka
16.07.20 20:05, Brett Cannon пише: I honestly wouldn't expect that flag to last forever because it exists purely to help with Python 2 -> 3 transitions. Since it fundamentally changes how things like comparison and `str()` work it isn't something to flip on needlessly and you would be better

[Python-ideas] Re: Allowing -b (BytesWarning) to be activated in other ways

2020-07-16 Thread Brett Cannon
I honestly wouldn't expect that flag to last forever because it exists purely to help with Python 2 -> 3 transitions. Since it fundamentally changes how things like comparison and `str()` work it isn't something to flip on needlessly and you would be better off using a type checker or linter to