y used
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?
tion 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 funct
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
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
="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 t
o take X versions 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 (&
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
nge the default
encoding 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
ocess 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 `encodin
BOM is not recommended, 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
__
urse, 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
* "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-pa
important 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-idea
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
;
>> 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,
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`
ode by default.
* "Python (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 ma
the subprocess.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
__
ide a 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
use UTF-8 mode
consistently.
But it will break legacy applications running on old Python environment.
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 prog
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
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 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 be
No need to 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-idea
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
> open(path
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 us
>
> 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&quo
ut 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
_
But I don't think it's enough reason 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
r beginners
use UTF-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
(CI)
> environments 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 rea
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?
>
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/
--
Inada
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 Wind
; your configuration 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 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
mend it to
> > anyone. It was a nightmare when folks have Python 2 and 3 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 wa
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
-site 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
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 "values
https://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.
than PEP 671.
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 un
rozenset.
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 -
should 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-id
oposed literal might have significant 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 mail
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 cos
n-typing-usage-of-annotations
"With this in mind, uses for annotations incompatible with the
aforementioned PEPs should be considered deprecated."
--
INADA Naoki
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman
remove the item. Unnecessary destructive change is
bad. It reduces code readability, and it may create hard bug.
If this proposal is adding `list.get([index[, default]])` too, I still -0.
I don't know how often it is useful.
Regards,
--
INADA Naoki
__
ck hash equality
between formula and download site. If it's different, Homebrew or download
site is under attack.
So I think it's worth enough to moving to stronger and more used hash.
(And by this reason, I prefer sha256 to sha512 for now.)
--
INADA Naoki
___
I think long URL in comment or docstring is good reason to ignore
line length limit.
But I'm not sure about general long string literals.
--
INADA Naoki
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/lis
thon.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
INADA Naoki
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
On Fri, Mar 1, 2019 at 9:47 PM Chris Angelico wrote:
>
> On Fri, Mar 1, 2019 at 11:00 PM INADA Naoki wrote:
> >
> > I dislike adding more operator overload to builtin types.
> >
> > str is not commutative, but it satisfies a in (a+b), and b in (a+b).
> > T
On Fri, Mar 1, 2019 at 10:10 PM Steven D'Aprano wrote:
>
> On Fri, Mar 01, 2019 at 08:59:45PM +0900, INADA Naoki wrote:
> > I dislike adding more operator overload to builtin types.
> >
> > str is not commutative, but it satisfies a in (a+b), and b in (a+b).
> >
t;a": 3} -- It seems bit curious compared with + of sequence,
because [2]+[3] is not [5].
It looks like more Counter than container.
* ValueError -- Hmm, it looks ugly to me.
So I don't think "sum" is not fit to dict semantics.
Regards,
--
INADA Naoki
__
quence and it seems hard to call it "sum".
Regards,
2019年3月1日(金) 23:19 Ivan Levkivskyi :
> On Fri, 1 Mar 2019 at 13:48, INADA Naoki wrote:
>
>> >
>> >
>> > Is that an invariant you expect to apply to other uses of the +
>> > operator?
&g
`seq + seq` in
this point of view.
I don't propose | than +. I just mean difference between
dict.update() and seq+seq is not
smaller than difference between dict.update() and set|set.
If | seems not fit to this operation, + seems not fit to this operation too.
--
INADA Naoki
kwargs. I think non string keys are allowed for {**d1,
**d2} by language.
--
INADA Naoki
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
s mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
--
INADA Naoki
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
On Mon, Mar 4, 2019 at 6:52 PM Stefan Behnel wrote:
>
> I think the main intentions is to close a gap in the language.
>
> [1,2,3] + [4,5,6]
>
> works for lists and tuples,
>
> {1,2,3} | {4,5,6}
>
> works for sets, but joining two dicts isn't simply
>
> {1:2, 3:4} + {5:6}
>
Operators
ng new method to builtin should have a high bar.
Adding new operator to builtin should have a higher bar.
Adding new syntax should have a highest bar.
--
INADA Naoki
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
On Tue, Mar 5, 2019 at 12:02 AM Stefan Behnel wrote:
>
> INADA Naoki schrieb am 04.03.19 um 11:15:
> > Why statement is not enough?
>
> I'm not sure I understand why you're asking this, but a statement is "not
> enough" because it's a statement an
updated()?
sorted() is a function so it looks different from L.sort()
But d.updated() is very similar to d.update() for human eyes.
## How about d1 - d2?
If it is really useful, it can be implemented as method too.
dict.discard(sequence_of_keys)
On Tue, Mar 5, 2019 at 5:23 PM Chris Angelico wrote:
>
> On Tue, Mar 5, 2019 at 6:40 PM INADA Naoki wrote:
> > This is why function and methods are better:
> >
> > * Easy to search.
> >
> > ## Merits of dict.merge() over operator +
> >
> > * Eas
On Tue, Mar 5, 2019 at 5:50 PM Nathaniel Smith wrote:
>
> On Mon, Mar 4, 2019 at 11:41 PM INADA Naoki wrote:
> > Then, I propose `dict.merge` method. It is outer-place version
> > of `dict.update`, but accepts multiple dicts. (dict.update()
> > can be updated to accept
> * Type of returned value is always same to d1.copy(). No issubclass,
> no __iadd__.
I'm sorry, I meant __radd__, not __iadd__.
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct:
set too if it is added to dict for consistency.
FWIW, Scala uses `++` for join all containers.
Kotlin uses `+` for join all containers.
(ref
https://discuss.python.org/t/pep-584-survey-of-other-languages-operator-overload/977)
Regards,
--
Inada Naoki
___
On Tue, Mar 5, 2019 at 7:26 PM Steven D'Aprano wrote:
>
> On Sat, Mar 02, 2019 at 01:47:37AM +0900, INADA Naoki wrote:
> > > If the keys are not strings, it currently works in CPython, but it may
> > > not work with other implementations, or future versions of CPyt
On Tue, Mar 5, 2019 at 7:59 PM Steven D'Aprano wrote:
>
> On Tue, Mar 05, 2019 at 06:04:40PM +0900, INADA Naoki wrote:
> [...]
> > One obvious merit of d.merge(...) is it returns same type of d.
> > `type(d1)(d1, d2)` looks ugly.
> >
> > But people just wan
There was a thread for the topic.
https://mail.python.org/pipermail/python-dev/2018-October/155435.html
2019年3月6日(水) 2:02 Anders Hovmöller :
>
> On a related note: **kwargs, should they support arbitrary strings as
> keys? I depend on this behavior in production code and all python
> implementa
On Wed, Mar 6, 2019 at 5:34 PM Stefan Behnel wrote:
>
> INADA Naoki schrieb am 05.03.19 um 08:03:> On Tue, Mar 5, 2019 at 12:02 AM
> Stefan Behnel wrote:
> >> INADA Naoki schrieb am 04.03.19 um 11:15:
> >>> Why statement is not enough?
> >>
> >&g
th dict and think expressions like "d1 | d2" and "d1 & d2" would just be
> confusing and misleading to encounter in the wild.
Hmm. The PEP proposed dict - dict, which is similar to set - set (difference).
To me, {"a": 1, "b": 2} - {"b":
as
> in
>
>
>
> And as I recall, in SGML the first value "original" is the one that is
> in effect. This is what happens with the LaTeX command
> \providecommand.
>
> FURTHER LINKS
> [6] https://docs.python.org/3/reference
most natural to the
container's type.
That's what Kotlin and Scala does. (Although Scala used ++ instead of +).
ref:
https://discuss.python.org/t/pep-584-survey-of-other-languages-operator-overload/977
Regards,
--
Inada Naoki
___
Python-ideas m
pdated".
> That would eliminate some of the difficulties with an operator, such as
> the difference between + which requires both operands to be a dict
> but += which can take any mapping or (key,value) iterable.
>
> --
> Steven
--
Inada Naoki
___
-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> ___
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
Inada Naoki
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
ease try Python 3.8a3!
https://docs.python.org/3.8/library/functools.html#functools.singledispatchmethod
https://www.python.org/downloads/release/python-380a3/
--
Inada Naoki
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/m
l library (like SQLAlchemy) provides better API for
building query.
Regards,
--
Inada Naoki
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
27;m weak +1 to implement this idiom directly in stdlib.
tempfile.mkstemp doesn't support symlink. So people need to
use external command `ln -sf` for now.
Regards,
--
Inada Naoki
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
ython-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.python.org/archives/list/python-ideas@python.org/message/FCTXGDT2NNKRJQ6CDEPWUXHVG2AAQZZY/
&g
notations
>>> def foo() -> int | str:
... pass
...
>>> foo.__annotations__
{'return': 'int | str'}
Please read PEP 563.
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To uns
plement runtime behavior for `str | int`.
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
...
Mean +- std dev: 280 ns +- 8 ns
$ python3 -m pyperf timeit -s 'x=[]; T=(str, list)' -- 'isinstance(x, T)'
.
Mean +- std dev: 73.1 ns +- 1.0 ns
```
Typing module doesn't have speedup extension.
I expect`isinstance([], Union[str, list])` will be much
e is new way
to do it but it may be much
slower and use much memory, so you shouldn't use it unless you can
ignore performance."
Regards,
--
Inada Naoki
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to p
ilman3/lists/python-ideas.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
_
It looks + 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.
Rega
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
0 on + 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?
union 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
T
@python.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://ma
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
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
On Sat, Jan 11, 2020 at 2:30 AM Andrew Barnert wrote:
>
> On Jan 10, 2020, at 03:45, Inada Naoki wrote:
> >
> > Hi, all.
> >
> > I believe UTF-8 should be chosen by default for text encoding.
>
> Correct me if I’m wrong, but I think in Python 3.7 on Windo
x...
>
> I 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
UTF-8 mode
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-id
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
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 w
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 PE
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 -- p
g unicode" (
https://bugs.python.org/issue37111)
[3] Packaging tutorial in 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.pytho
MH4M2JWPKA7B6GRLZHYD/
> 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/pyt
1 - 100 of 205 matches
Mail list logo