[issue43624] Add underscore as a decimal separator for string formatting

2021-03-25 Thread Terry Davis
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

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-26 Thread Terry Davis
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

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-29 Thread Terry Davis
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

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-29 Thread Terry Davis
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' &

[issue43624] Add underscore as a decimal separator for string formatting

2021-05-04 Thread Terry Davis
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

[issue40012] Avoid Python 2 documentation to appear in Web search results

2020-03-23 Thread Terry Davis
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

[issue41231] Type annotations lost when using wraps by default

2020-07-07 Thread Terry Davis
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

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2019-06-20 Thread Terry Davis
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

[issue36591] Should be a typing.UserNamedTuple

2019-04-10 Thread Terry Davis
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