[issue24711] Document getpass.getpass behavior on ^C

2022-01-17 Thread David Lord
David Lord added the comment: Meant to say that "done" shows up on the same line, not the shell prompt. An earlier version of my example was in the REPL, where its prompt *does* show up on the same line. -- ___ Python track

[issue24711] Document getpass.getpass behavior on ^C

2022-01-17 Thread David Lord
David Lord added the comment: I can reproduce this on Python 3.10. Actually, `input` and `getpass` both seem to have this behavior now. Please reopen it. ```python import getpass try: getpass.getpass("in: ") except: pass print("done") ``` ``` $ python example

[issue39168] Generic type subscription is a huge toll on Python performance

2020-11-15 Thread David Lord
David Lord added the comment: I'm using Arch Linux. After your reply I tried again and now I'm seeing the same result as you, negligible difference from inheriting `Generic` on Python 3.9. I can't explain it, I ran the timings repeatedly before I posted here, but I guess it was a weird

[issue39168] Generic type subscription is a huge toll on Python performance

2020-11-15 Thread David Lord
David Lord added the comment: Is this performance issue supposed to be fixed in 3.9? I'm still observing severe slowdown by inheriting from `Generic[T]`. I'm currently adding typing to Werkzeug, where we define many custom data structures such as `MultiDict`. It would be ideal

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread David Lord
David Lord added the comment: It appears to be solved in Flask-SQLAlchemy's development version already, as the mixins now inherit from `type`. We caught the issue when we started applying flake8 (possibly through flake8-bugbear). -- nosy: +davidism

[issue35894] Apparent regression in 3.8-dev: 'TypeError: required field "type_ignores" missing from Module'

2019-05-19 Thread David Lord
Change by David Lord : -- nosy: +davidism ___ Python tracker <https://bugs.python.org/issue35894> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30838] re \w does not match some valid Unicode characters

2017-07-05 Thread David Lord
David Lord added the comment: After thinking about it more, I guess I misunderstood what \w was doing compared to isidentifier. Since Python just relies on the Unicode database, there's not much to be done anyway. Closing this. For anyone interested, we ended up with a hybrid approach

[issue30838] re \w does not match some valid Unicode characters

2017-07-03 Thread David Lord
David Lord added the comment: Adding `or ('a' + s).isidentifer()`, to catch valid id_continue characters, to the test in the previous script reveals many more characters that seem like valid word characters but aren't matched by `\w`. -- ___ Python

[issue30838] re \w does not match some valid Unicode characters

2017-07-03 Thread David Lord
New submission from David Lord: This came up while writing a regex to match characters that are valid in Python identifiers for Jinja. https://github.com/pallets/jinja/pull/731 `\w` matches all valid identifier characters except for 4 special cases: import unicodedata import re import sys