New submission from Terry Davis :
Proposal:
Enable this
>>> format(12_34_56.12_34_56, '_._f')
'123_456.123_456'
Where now only this is possible
>>> format(12_34_56.12_34_56, '_.f')
'123_456.123456'
Based on the discussion in the
Terry Davis added the comment:
Good point Victor, though I wonder how likely it is that a person using 3.10
would only use this particular new feature, and have an otherwise
backwards-compatible codebase.
This isn't something that I asked about out of necessity, and there hasn't
Terry Davis added the comment:
Victor,
> '_.f' would be the same as '_f'?
No, the example in my original post is wrong, '_.f' isn't allowed now.
The proposal should use '_f' to describe the current behavior.
> Should "._f" be
Terry Davis added the comment:
Current behavior:
>>> format(1234.1234, '_f')
'1_234.123400'
>>> format(1234.1234, ',f')
'1,234.123400'
New behavior:
>>> format(1234.1234, ',._f')
'1,234.123_400'
&
Terry Davis added the comment:
If no one else has any comments, I'll assume there is consensus and start
working on this. I have not contributed to CPython before, nor have I worked on
production C code, so it may be a while before I get anywhere.
--
versions: +Python 3.11 -P
Terry Davis added the comment:
It seems like using "noindex" to tell search engines not to look at Python 2
docs at all would have the side-effect of breaking Python 2 documentation
searches.
I have gotten into the habit of searching for "python 3" explicitly, which I
t
Terry Davis added the comment:
I don't understand this use-case, but would it make sense to `ChainMap` the
wrapper's __annotations__ on top of the wrapped __annotations__?
--
nosy: +Terry Davis
___
Python tracker
<https://bu
Terry Davis added the comment:
I'd like to re-raise this issue. Should I cross-post to "discuss.python.org -
Ideas"?
------
nosy: +Terry Davis
___
Python tracker
<https://bugs.pyt
New submission from Terry Davis :
There should be a builtin alias for `Type[NamedTuple]` so that library
authors user-supplied `NamedTuple`s can properly type-check their code.
Here's a code sample that causes an issue in my IDE (PyCharm)
from typing i