[Python-ideas] Re: Make UTF-8 mode more accessible for Windows users.

2021-02-10 Thread Eryk Sun
On 2/11/21, Christopher Barker wrote: > On Wed, Feb 10, 2021 at 12:33 AM Paul Moore wrote: > >> So get PYTHONUTF8 added to the environment activate script. That's a >> simple change to venv. And virtualenv, and conda > > That's probably a good solution for venv and virtualenv -- essentially add >

[Python-ideas] Re: Make UTF-8 mode more accessible for Windows users.

2021-02-10 Thread Christopher Barker
On Wed, Feb 10, 2021 at 12:33 AM Paul Moore wrote: > So get PYTHONUTF8 added to the environment activate script. That's a > simple change to venv. And virtualenv, and conda That's probably a good solution for venv and virtualenv -- essentially add it as another environment creation option. but

[Python-ideas] Re: Make UTF-8 mode more accessible for Windows users.

2021-02-10 Thread Eryk Sun
On 2/10/21, M.-A. Lemburg wrote: > > setx PYTHONUTF8 1 > > does the trick in an admin command shell on Windows globally. The above command sets the variable only for the current user, which I'd recommend anyway. It does not require administrator access. To set a machine value, run `setx /M PYTHON

[Python-ideas] Re: Generic NamedTuples

2021-02-10 Thread Eric V. Smith
https://bugs.python.org/issue42269 Although I haven't done much about it. The problem is that it needs to return a new class, not just inject methods into the existing class you defined. Eric On 2/10/2021 11:13 AM, Peter Ludemann wrote: Ben Avrahami wrote 9 Feb 2021, 03:30: That's the cu

[Python-ideas] Re: Very strange problem in python

2021-02-10 Thread nate lust
This is not really a support mailing list, it is intended for ideas about modifying the python language or its libraries. However after a quick look, the line tt = arr2 is not creating a copy of array2. It creates a new name bound to the same underlying object, an alias if you will. You will need

[Python-ideas] Re: Generic NamedTuples

2021-02-10 Thread Peter Ludemann
Ben Avrahami wrote 9 Feb 2021, 03:30: > That's the current alternative, but namedtuples (unlike dataclasses) are > slotted, which makes them more space-efficient and (slightly) faster. When I use @dataclass(frozen=True), I manually add a __slots__ attribute. I presume this makes the resulting

[Python-ideas] Very strange problem in python

2021-02-10 Thread Priya Singh
def closset_mtach(check, arr, itr): id_min = [] for ii in range(itr): id_min_tmp = np.argmin( abs(arr - check) ) id_min.append(id_min_tmp) arr[id_min_tmp] = float('-inf') id_min = np.array(id_min) return id_min def get_CS_id(arr1, arr2, tol, itr): tt

[Python-ideas] Re: Make UTF-8 mode more accessible for Windows users.

2021-02-10 Thread Paul Moore
On Wed, 10 Feb 2021 at 13:31, Inada Naoki wrote: > > I'm sorry about it. I have not chose actual implementation yet so I > can not write concrete PEP yet. It's not a problem. I appreciate all of the time you're putting into considering the responses and keeping the discussion going. (And please d

[Python-ideas] Re: Make UTF-8 mode more accessible for Windows users.

2021-02-10 Thread M.-A. Lemburg
On 10.02.2021 08:15, Christopher Barker wrote: > And all the examples given here of how to set environment variables and > shortcuts, etc on Windows is EXACTLY the kind of information  I don't want to > have to provide for my students :-( -- I'm teaching Python, not Windows > administration. That'

[Python-ideas] Re: Make UTF-8 mode more accessible for Windows users.

2021-02-10 Thread Inada Naoki
On Wed, Feb 10, 2021 at 8:39 PM Paul Moore wrote: > > On Wed, 10 Feb 2021 at 11:01, Inada Naoki wrote: > > > > On Wed, Feb 10, 2021 at 5:33 PM Paul Moore wrote: > > > > > > So get PYTHONUTF8 added to the environment activate script. That's a > > > simple change to venv. And virtualenv, and conda

[Python-ideas] Re: Make UTF-8 mode more accessible for Windows users.

2021-02-10 Thread Paul Moore
On Wed, 10 Feb 2021 at 11:01, Inada Naoki wrote: > > On Wed, Feb 10, 2021 at 5:33 PM Paul Moore wrote: > > > > So get PYTHONUTF8 added to the environment activate script. That's a > > simple change to venv. And virtualenv, and conda - yes, it need to > > happen in multiple places, but that's stil

[Python-ideas] Re: Make UTF-8 mode more accessible for Windows users.

2021-02-10 Thread Inada Naoki
On Wed, Feb 10, 2021 at 5:33 PM Paul Moore wrote: > > So get PYTHONUTF8 added to the environment activate script. That's a > simple change to venv. And virtualenv, and conda - yes, it need to > happen in multiple places, but that's still easier IMO than proposing > a change to Python's already com

[Python-ideas] Re: Make UTF-8 mode more accessible for Windows users.

2021-02-10 Thread Paul Moore
On Wed, 10 Feb 2021 at 07:14, Christopher Barker wrote: > > On Tue, Feb 9, 2021 at 1:04 PM Paul Moore wrote: >> >> Why is that an issue? In the first instance, do the sorts of >> "beginner" we're discussing here have multiple python installs? Would >> they need per-interpreter configuration of UT