Riccardo Polignieri added the comment:
> `locale.getlocale()` is now returning strange results
Not really "strange results" - fact is, now "getlocale()" returns the locale
name *as if* it were already set from the beginnning (because it is, at least
in part).
Befo
Riccardo Polignieri added the comment:
Three years later, this problem seems on the way to fix itself
(https://xkcd.com/1822/).
Versioned shebangs (and versioned "/env" shebangs) used to be a more prominent
issue when you needed a way to tell Python 2 / Python 3 scripts apart
Change by Riccardo Polignieri :
--
nosy: +ricpol
___
Python tracker
<https://bugs.python.org/issue38671>
___
___
Python-bugs-list mailing list
Unsubscribe:
Riccardo Polignieri added the comment:
> the error should be better
Yes, that's what I maeant - sorry I should have phrased better.
I marked by mistake a couple of f-strings for translation and totally forgot
about it for a while... it took me some time to figure out what was going
New submission from Riccardo Polignieri :
Tested (on windows) with python 3.6, but I guess it's the same in py3.7:
# test.py
def hello(x):
print(_(f'hello {x}'))
> py pygettext.py test.py
Traceback (most recent call last):
File "C:\Program Files\Python36\Tools\i
Riccardo Polignieri added the comment:
@Jens Lindgren
I know, pretty annoying right? But see previous answer by Paul here
http://bugs.python.org/issue28686#msg287181
> The Unix ability to have 2 different versions of Python on PATH
> and select which you use based on executable name d
Riccardo Polignieri added the comment:
Paul:
> When inside a venv:
- If you want to execute a script, use a shebang of #!/usr/bin/env python and
then use `py myscript.py`
Yes, I'm totally on board with this - that is, as far as I run my own scripts.
I just wonder, what if one d
Riccardo Polignieri added the comment:
Paul:
> it's not possible to tell by inspection the version of a Python interpreter.
True, but it's an implementation detail. Couldn't be solved? Versioned
interpreters a la Linux, of course, or maybe how about including some kind
Riccardo Polignieri added the comment:
> I'm inclined to say YAGNI, and we simply leave "/usr/bin/env python3"
> undefined.
I can't say I'm really happy with this answer. Fact is,
1) you almost always have to work from within a virtual env these days,
2) you