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/GEISYQ5BXWGKT33RWF77EOSOMMMFUBUS/
> Code of Conduct: http://python.org/psf/code
On Tue, Jun 21, 2022 at 3:49 AM Marco Sulla
wrote:
>
> On Sun, 19 Jun 2022 at 03:06, Inada Naoki wrote:
> > FWIW, I had proposed str.iterlines() to fix incompatibility between
> > IO.readlines() and str.splitlines().
>
> It's a good idea IMHO. In your mind, str.iterlin
SON.
Additionally, there are many very fast string algorithms work with
UTF-8 written in C or Rust.
Python is glue language. Reducing overhead with such libraries is good
for Python.
For now, my recommendation is using some library written in Cython if
it is performance critical.
Regards,
--
Inad
can not confirm the benefits. We have macro benchmark
(pypeformance), but it is still small. Most hot data fits into L2
cache.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to
On Mon, Jan 17, 2022 at 8:49 PM Steven D'Aprano wrote:
>
> On Mon, Jan 17, 2022 at 08:04:50PM +0900, Inada Naoki wrote:
>
> > Name lookup is faster than building set in most case.
> > So I don't think cost to look name up is important at all.
>
> But the cost to look
nt efficiency benefit only when:
* It is used in the function scope. and,
* It can not be optimized by the compiler now.
I am not sure how many such usages in stdlib.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
d write `_TARGETS = frozenset((3, 5, 7, 11, 12, 18, 27, 28,
30, 35, 57, 88))` in global scope and use it as `if n in _TARGETS`.
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-l
So we can estimate how frozenset literal is useful by seeing how
frozenset is used.
Unless how the literal improve codes is demonstrated, I am -0.5 on new
literal only for consistency.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-i
71.
PEP 505 can be used for default parameters (e.g. `hi ??= len(a)`) and
many other places.
I feel it has far better benefit / language complexity ratio.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscri
://mail.python.org/archives/list/python-ideas@python.org/thread/QVTGZD6USSC34D4IJG76UPKZRXBBB4MM/
> but not this exact idea.
What is difference between your idea and previsous discussion?
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
T
FWI, this is a previous thread.
https://discuss.python.org/t/add-a-dict-sort-method/5747
2021年5月30日(日) 1:57 Marco Sulla :
> Since `dict` now is ordered, how about a `sort()` method?
> It could have the same signature of list.sort(), with an optional
> parameter "by" that can be "keys" or
ideas.
Since its user environment variable, it won't break legacy
applications running in a parent account.
Does anyone against adding "Enable UTF-8 mode" in the Start menu?
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@
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
> &g
on the same
> > machine, but now, in the age of environments, it's still a really bad idea.
>
> Sure, PYTHONPATH was just an example. Environment variables are how
> you configure Python in many ways. I'm asking why UTF-8 mode is so
> special it needs a different configuration m
On Wed, Feb 10, 2021 at 6:02 AM Paul Moore wrote:
>
> On Tue, 9 Feb 2021 at 17:32, Inada Naoki wrote:
> >
> > On Tue, Feb 9, 2021 at 7:42 PM M.-A. Lemburg wrote:
> > >
> > > Here's a good blog post about setting env vars on Windows:
> > >
> &g
figuration via the application and using the registry.
>
> Perhaps we could have both: an env var to enable UTF-8 mode and
> a registry key set by the installer.
>
I don't want to recommend env vars and registry for conda and portable
Python users...
--
Inada Naoki
__
On Tue, Feb 9, 2021 at 4:53 PM Christopher Barker wrote:
>
>>
>> because UTF-8 mode helps many Windows users but it is not accessible
>> enough for Windows users.
>
>
> It's not just accessibility, but discoverability -- Windows users -- and even
> more so developers that don't generally use
n-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/TMFUKID6KMTEAZAS4ILBHSG23GGYNCS4/
> Code of Conduct: http://python.org/psf/codeofconduct/
--
In
On Tue, Feb 9, 2021 at 3:37 PM Christopher Barker wrote:
>
> On Mon, Feb 8, 2021 at 6:11 PM Inada Naoki wrote:
>>
>> >
>> Unlike Windows, environment variables work very fine for such use cases.
>
>
> Windows has environment variables, doesn't it?
>
Bu
ronments might need it too.
>
Unlike Windows, environment variables work very fine for such use cases.
On Unix, direnv, dotenv, and maybe more tools are there. It is not
only for Python, but for projects.
> Which is another good reason that having it b
8 locale by default.
There is no guarantee. But if default locale is not UTF-8, I don't
think the environment is suited for beginners who learning to Python.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscrib
eason to put a new config
file to user profile.
If users don't have system privilege, they can still install another Python.
Config file in user profile is fragile. If all venvs start using
profile directory, it become
unmaintainable soon.
We can just recommend per-user install for new users.
R
hout strong need.
Currently, a per-install setting is not possible. So it is the only problem.
If adding option to pyvenv.cfg is not make sense, we can add
`python.ini` to same place pyvenv.cfg.
i.e., directory containing python.exe, or one above directory.
--
Inada Naoki
__
>
> Also am I right to assume that the impact of these changes would only impact
> on Windows?
>
I think we don't have any reason to restrict this for Windows.
But since this idea is proposed only for Windows users, only Windows
installer will have "Enable UTF-8 mode" op
ile would not help.
> But a python.ini could.
>
python.exe lookup pyvenv.cfg even outside of venv.
So we can write utf8mode=1 in pyvenv.cfg even outside of venv.
The main limitation is that users can not write config file in install
location when Python is installed for system, not for user.
On Fri, Feb 5, 2021 at 8:20 AM Ben Rudiak-Gould wrote:
>
>
> It seems as though most of those commenting in the other thread don't
> actually use Python on Windows. I do, and I can say it's a royal pain to have
> to write open(path, encoding='utf-8') all the time. If you could write
>
o edit any file outside the install location.
* Easy to clean uninstall
* Portable app friendly
* One file per environment
* Breaking the config file affects only one environment.
So I still prefer pyvenv.cfg.
--
Inada Naoki
___
Python-ideas maili
On Tue, Feb 2, 2021 at 6:31 AM Barry Scott wrote:
>
>> On 30 Jan 2021, at 12:05, Inada Naoki wrote:
>>
>> Where would Python look for a "configuration file like `pyvenv.cfg`" ?
>>
>> I am not a Windows expert so I am not sure. But I think it should
On Sat, Jan 30, 2021 at 3:45 PM Christopher Barker wrote:
>
> On Thu, Jan 28, 2021 at 4:25 PM Inada Naoki wrote:
>>
>> > The "real" solution is to change the defaults not to use the system
>> > encoding at all -- which, of course, we are moving towards w
On Fri, Jan 29, 2021 at 12:54 PM Ben Rudiak-Gould wrote:
>
> On Wed, Jan 27, 2021 at 11:36 PM Inada Naoki wrote:
>>
>> * UnicodeDecodeError is raised when trying to open a text file written in
>> UTF-8, such as JSON.
>> * UnicodeEncodeError is raised when trying to
onment.
If we have per-environment option, it's easy to recommend users to
enable UTF-8 mode.
> Maybe this would be a good thing to do once there are Warnings in place?
>
Do you mean programs only runs on UTF-8 mode warns if UTF-8 mode is
not enabled? e.g.
```
if sys.platform == "
small tool to allow configuration after installation?
* python3 -m utf8mode enable|disable?
* Accessible only for CLI user
* Add "Enable UTF-8 mode" and "Disable UTF-8 mode" to Start menu?
Any ideas are welcome.
--
Inada Naoki
_
ocess.PIPE encoding in UTF-8 mode.
I need to reconsider about stdin/stdout encoding when they are redirected.
Maybe, we can use GetConsoleCP() for stdin encoding, and
GetConsoleOutputCP() for output encoding. I will write another
proposal for it.
--
Inada Naoki
_
(ANSI version)" will disable the UTF-8 mode by default.
User can override the default by `-Xutf8` option and `PYTHONUTF8`
environment variable.
Does this idea make sense?
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.o
statistics wouldn't be tracked, unless the installer
> phones home.
Can pip send `locale.getpreferredencoding(False)` to PyPI?
If so, we can set `PYTHONUTF8` environment variable from the installer too.
Or we can provide small tool to set/unset `PYTHONUTF8` envi
;>
>> Maybe, we need to update the tutorial (*) to use `encoding="utf-8"`.
>
>
> Telling people to always add `encoding='utf8'` makes much more sense to me
> than introducing a new function and telling them to do that.
>
Ok, I will not add open_utf8() to PEP 597, and updat
As my understanding, "Fusion manifest for an unpackaged Win32 app" (*)
works for non Store Apps too.
(*)
https://docs.microsoft.com/ja-jp/windows/uwp/design/globalizing/use-utf8-code-page#examples
--
Inada Naoki
___
Python-ideas ma
mportant information for us.
Of course, there are some downsides:
* Windows team needs to maintain more versions.
* More divisions for "Python on Windows" environment.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@
ot;b" is not allowed for mode.
(*) Another option is to use "utf-8-sig" for reading and "utf-8" for
writing. But it has some drawbacks. utf-8-sig has overhead because it
is a wrapper implemented in Python. And TextIOWrapper has fast-paths
for ut
course, we need a regular deprecation period.
When encoding is omitted, they emit DeprecationWarning (or
EncodingWarning which is a subclass of DeprecationWarning) in three
versions (Python 3.10~3.12).
How do you think this idea?
Should we "change
ommended, and Notepad uses UTF-8
without BOM as default encoding from 1903, UTF-8 with BOM is still
used in some cases.
For example, Excel reads CSV file with UTF-8 with BOM or legacy
encoding. So some CSV files is written with BOM.
Regards,
--
Inada Naoki
_
fun process repeated again.
Yes, if we can change the default encoding in 2030, two open functions
will become messy.
But there is no promise for the change. Without mitigating the pain,
we can not change the default encoding forever.
Anyway, thank you for your feedback.
Two people prefer `encoding="ut
ding or not.
Please read the first motivation section in the PEP.
https://www.python.org/dev/peps/pep-0597/#using-the-default-encoding-is-a-common-mistake
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send
On Sat, Jan 23, 2021 at 2:43 PM Random832 wrote:
>
> On Fri, Jan 22, 2021, at 20:34, Inada Naoki wrote:
> > * Default encoding is "utf-8".
>
> it might be worthwhile to be a little more sophisticated than this.
>
> Notepad itself uses character set detection
ns and multiple deprecation phases), rather
> than aiming for a messy goal where people aren't sure which function
> to use?
>
Ultimate goal is make the "utf-8" default. But I don't know when we
can change it.
So I focus on what we can do in near future (< 5 years, I hope).
Re
t;locale"` instead of
`encoding=locale.getpreferredencoding(False)` when they need to use
locale encoding.
We might change more places where the default encoding is used. But it
should be done slowly and carefully.
---
How do you think about this idea? Is this w
Thank you! I didn't know that.
I will use `if False: # TYPE_CHECKING` so the compiler will remove
all imports inner it.
But the official way is preferred so that all typing ecosystems follow it.
--
Inada Naoki
___
Python-ideas mailing list
will break existing `from typing import TYPE_CHECKING` codes.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/li
lar function for the
> ProcessPoolExecutor, e.g. asyncio.to_process?
>
asyncio.to_thread doesn't use ThreadPoolExecutor. Since thread is
cheap, the function create a new thread every time.
On the other hand, process is not cheap. That's why the only thread
has convenient way to run function in.
R
d
keys are eventually evicted. (behaves like least recently frequently
used?)
* Minimum overhead for managing keys.
So I think a random eviction algorithm is better than LRU.
Off topic: Can we add random_cache to functools, like lru_cache?
Rega
in
typing.get_type_hints(), instead of adding Any to builtins.
As Abdulla said, having both `any` and `Any` in builtins makes Python
more confusing.
If typing.get_type_hints() is the problem, why don't we changing
typing.get_type_hints() behavior?
Oh, note that Abdulla said: "we can annotate our **functions** with
“Any" right away without the extra step."
Python 3.9.0 (default, Nov 21 2020, 14:01:55)
>>> from __future__ import annotations
>>> def foo(a: Any, b: Dict[Any, An
gt; https://mail.python.org/archives/list/python-ideas@python.org/message/ELI474TKP2OKHP4NW5HOVUPKDPLYE2JP/
> Code of Conduct: http://python.org/psf/codeofconduct/
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to
nce critical part of CPython.
We should take care of cost/merit ratio always.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/ma
for duck-typed language.
Regards,
--
Inada Naoki
___
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
f. They are
just shortcut for common cases.
Regards,
--
Inada Naoki
___
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/
M
"w", encoding="utf-8") as f:
return dump(obj, f, **kwargs)
def loadf(obj, path, *, **kwargs):
with open(path, "rb") as f:
return load(f, **kwargs)
Regards,
--
Inada Naoki
___
Python-ideas mailing l
honic.
> python -m timeit -n 1 --setup "from uuid import uuid4 ; o =
> {str(uuid4()).replace('-', '') : str(uuid4()).replace('-', '') for i
> in range(1)} ; it = iter(o) ; key0 = next(it) ; o.pop(key0)"
> "dict(o)"
>
I
quot;]*1000))` is 1, not 1000.
> 2. Why, in your opinion, no relevant speedup was done?
>
We have "one big resize" logic in dict_merge already.
And I use dummy empty dictkeys for new empty dict.
So we don't allocate any temporary, intermediate dict
reas it also
> configures 'Infinity'.
>
In case of encoding, we deprecated and ignored it in json.loads since
Python 3.1, and removed in 3.9.
Users still can load/save JSON with legacy encodings with open() + dump/load.
--
Inada Naoki
___
Python-ideas mail
rning.
So helper functions will save people from this kind of bugs too.
[1] In case of `json.load(f)`, we can use binary file instead.
[2] https://www.python.org/dev/peps/pep-0597/
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas
ng is not acceptable for
> many use cases).
Maybe, OrderedDict can have od.next_item(key) and od.prev_item(key).
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@py
.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/G2BCHK766Z6ABFEF5KOKC27W4VBNNVSE/
> Code of Conduct: http://python.org/psf/codeofconduct/
--
Inada Naoki
_
On Tue, Aug 4, 2020 at 3:35 AM Christopher Barker wrote:
>
> On Sat, Aug 1, 2020 at 6:10 PM Inada Naoki wrote:
>>
>> Repacking is mutation, and mutating dict while iterating it breaks the
>> iterator.
>> But `d.items()[42]` don't looks like mutation.
>
>
>
On Sun, Aug 2, 2020 at 2:34 AM Christopher Barker wrote:
>
> On Sat, Aug 1, 2020 at 2:28 AM Marco Sulla
> wrote:
>>
>> On Sat, 1 Aug 2020 at 03:00, Inada Naoki wrote:
>>>
>>> Please teach me if you know any algorithm which has no hole, O(1)
&
we add some tools to itertools, instead of "itertools recipe"?
* `first(iterable, default=None)` -- same to `[first] = iterable`, but
return default value instead of ValueError when iterable is empty.
* `nth(iterable, n, default=None)`
* `consume(iterator, n=None)`
Regards,
--
Inada
oduce n
temporary tuples.
* (CPython implementation detail) dict can detect if there is no hole.
index access is O(1) if there is no hole.
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to
difficult to notice
it is O(n) operation. They just think "Oh Python is fucking slow!".
So it is newbie-unfriendly at some point.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email t
gt; islice(dict.keys(), -1, -5)
>
> Reverse traversal did work in Python 2 but was foregone when making .keys() a
> view in Python 3 in order to avoid lulling users into making usually
> unnecessary copies.
>
dict is reversible now. You
nserted in the hashtable.
Yes, the array of items has hole. Otherwise, `del d[k]` become `O(n)`,
or `del d[k]` won't preserve insertion order.
Please teach me if you know any algorithm which has no hole, O(1)
deletion, preserving insertion order, and efficient and f
on-master -s
'd=dict.fromkeys(range(1000))' -- 'dict(d)'
python-master: . 21.5 us +- 0.2 us
python: . 4.52 us +- 0.16 us
Mean +- std dev: [python-master] 21.5 us +- 0.2 us -> [python] 4.52 us
+- 0.16 us: 4.76x faster (-79%)
Regard
enchmark.html
Regards,
--
Inada Naoki
___
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.py
er/frozendict/test/bench.py
>
I strongly recommend to use pyperf for benchmarking.
Otherwise, you will see random performance changes caused by random
reasons including ASLR.
https://pypi.org/project/pyperf/
https://pyperf.readthedocs.io/en/latest/
Reg
't conflict with another feature, then we
> can add it.
I believe this is a bad idea. It leads software to be huge,
unmaintainable, and unusable.
A Relatively high bar must be set for adding a feature to builtin type
than adding a third party package on PyPI.
Regards,
--
Inada Naoki
_
from_container(d)
61
>>> choice_from_container(d)
9858
>>> choice_from_container(d.keys())
2436
>>> choice_from_container(d.items())
(7685, None)
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send
Oh, sorry. I read you did "random pick from dict", but I hadn't read
you did "random pick and mutate dict" use case or not.
On Fri, Jul 10, 2020 at 3:08 PM Chris Angelico wrote:
>
> On Fri, Jul 10, 2020 at 4:04 PM Inada Naoki wrote:
> >
> > On Fri, Jul 10,
nt to benchmark that use case, the benchmark should
include time to mutate dict too. Otherwise, performance benefit is exaggerated
and no one trusts the benchmark.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscrib
s randam picking part is the bottleneck, micro optimization for
this part is not important.
That's why the higher level use case is needed to design useful benchmark.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.or
On Thu, Jul 9, 2020 at 12:45 PM Christopher Barker wrote:
>
> On Wed, Jul 8, 2020 at 7:13 PM Inada Naoki wrote:
>>
>> I think this comparison is unfair.
>
> well, benchmarks always lie
>
>> > d.items()[0]vslist(d.items())[0]
>>
>
s()) vsrandom.choice(list(d.items()))
Should be compared with `random.choice(items_list)` with `items_list =
list(d.items())` setup too.
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python
order-based __eq__ comparison?
It was rejected in this thread.
https://mail.python.org/archives/list/python-...@python.org/thread/R2MPDTTMJXAF54SICFSAWPPCCEWAJ7WF/#K3SYX4DER3WAOWGQ4SPKCKXSXLXTIVAQ
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@
tems[i])
sample 2:
for i in range(len(d)):
do(d.items()[i]) # if dict_items supports index access.
sample 1 is O(n) where n = len(d), but sample 2 is O(n^2).
By not supporting index access, dict_items prevents to write such
inefficient code.
--
Inada Naoki
_
On Mon, Jun 22, 2020 at 8:27 PM Barry Scott wrote:
>
> * New code and pyc format
> * pyc has "rodata" segment
>* It can be copied into single memory block, or can be mmapped.
> * co_code should be aligned at least 2 bytes.
>
>
> Would higher alignment help? malloc is using 8 or 16 byte
PyROData is deallocated, it munmap or free "rodata" segment.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailm
JWPKA7B6GRLZHYD/
> Code of Conduct: http://python.org/psf/codeofconduct/
--
Inada Naoki
___
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-i
packaging.python.org didn't specify encoding to
read a README.md (https://github.com/pypa/packaging.python.org/pull/682)
[4] json.tool had used locale encoding to read JSON files. (
https://bugs.python.org/issue33684)
Copyright <https://www.python.org/dev/peps/pep-0597/#id22>
T
On Sat, Mar 14, 2020 at 1:12 PM Inada Naoki wrote:
> I'm sorry, I meant (a) looks more consistent with PEP 560.
>
Sorry again, I meant PEP 585, not PEP 560 as Guido explained already.
--
Inada Naoki
___
Python-ideas mailing list -- python
On Sat, Mar 14, 2020 at 11:24 AM Inada Naoki wrote:
>
[snip]
> a) Add `|` to all types.
> b) Support it only statically (`from __future__ import annotations`).
>
[snip]
> But (b) seems more consistent with PEP 560.
>
I'm sorry, I meant (a) looks more consistent with PEP 560
First of all, I am not so happy about typing is increasing
Python runtime complexity.
TypeScript is the most successful language with gradual typing.
It has almost zero-cost about typing. It doesn't make JavaScript
runtime complex. I hoped Python goes in same way.
But Python went the different
On Sun, Jan 19, 2020 at 2:45 PM Siddharth Prajosh wrote:
>
> Moreover, shouldn't it work?
> How do I add that feature in Python?
How you can do it with warus operator.
>>> (xs := list(range(10))).append(42)
>>> xs
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 42]
doesn't break Mercurial. But I'm not sure. (Note that Mercurial on Python 3
on Windows is still beta.)
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
would definitely prefer to have a checkbox to configure "PYTHONUTF8" during
> installation rather than requiring it to be done manually, assuming it can be
> done safely and effectively across different systems. Not only for the sake
> of lowerin
cfg in the directory same to
python.exe) to enable UTF-8 mode.
But it may make Python startup process more complex...
Regards,
[1]:
https://docs.microsoft.com/en-us/windows/uwp/design/globalizing/use-utf8-code-page
[2]: https://docs.python.org/3/using/windows.html
[3]: Currently, Python version
l.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/OYUGN5FOIQGEHS5XJFGHNLQO4AUJMUON/
> Code of Conduct: http://python.org/psf/codeofconduct/
--
Inada Naoki
___
Pyth
on.org/message/T3Z32DEMWK46EBPULYB4CVI2QF4FS3WJ/
> Code of Conduct: http://python.org/psf/codeofconduct/
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.py
n is very natural to me.
But if we use + for dict merging, I think we should add + to set too.
Then the set has `.union()`, `|` and `+` for the same behavior.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To uns
+ and +=, and -0 on doing nothing.
>
If we choose `+`, `+` is now "merging two containers",
not just "concatenate two sequences".
So it looks very inconsistent that set uses `|` instead of `+`.
This inconsistency looks very ugly to me.
How do you feel about this?
I thi
first, or even remove
unbound method from the PEP.
Regards,
--
Inada Naoki
___
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
+ is the common
way to merge two containers in some way. Shouldn't we add it to abc?
So I think we shouldn't focus just adding `+` to dict. It comes with huge
side effect. We should think about general API design of the (esp. builtin)
containers.
Regards,
--
Inada Naoki
.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/W2FCSC3JDA7NUBXAVSTVCUDEGAKWWPTH/
> Code of Conduct: http://python.org/psf/codeofconduct/
--
Inada Naoki
___
Python-ideas mailing l
1 - 100 of 187 matches
Mail list logo