[issue47147] Allow `return yield from`

2022-04-02 Thread Patrick Reader
Patrick Reader added the comment: As the one who wrote the code, I can guarantee you that the StopIteration value is not always None. But I understand your point that for most other users it is always None, and therefore having special syntax might be misleading

[issue47147] Allow `return yield from`

2022-03-28 Thread Patrick Reader
Patrick Reader added the comment: Ok, will do, but what is the bar for a feature to need to go to the mailing lists first? I thought as this was a relatively minor one it wouldn't need to. Is it just because it's an actual syntax change

[issue47147] Allow `return yield from`

2022-03-28 Thread Patrick Reader
New submission from Patrick Reader : I would like to be able to use a `yield from` expression in a `return` statement without parentheses, as a small quality of life tweak, i.e.: return yield from gen instead of return (yield from gen) I think this makes sense, since `yield from

[issue46820] SyntaxError on `1not in...`

2022-02-21 Thread Patrick Reader
New submission from Patrick Reader : The following code gives a SyntaxError in 3.10, but used to work fine before (I have tested it in 2.7, 3.8, 3.9): 1not in [2, 3] It seems to be only the `not in` syntax which is affected; all other keywords still work correctly: 1in [2, 3

[issue44845] Allow keyword arguments in code.__new__

2021-11-19 Thread Patrick Reader
Change by Patrick Reader : -- nosy: -terry.reedy ___ Python tracker <https://bugs.python.org/issue44845> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45352] Move documentation for typed generic forms of standard collections to collections.abc

2021-10-03 Thread Patrick Reader
New submission from Patrick Reader : Currently the documentation for the generic forms (e.g. what the parameters in square brackets mean) of standard collections (e.g. collections.abc.Generator), is still on the typing page (https://docs.python.org/3.10/library/typing.html#typing.Generator

[issue44845] Allow keyword arguments in code.__new__

2021-08-05 Thread Patrick Reader
New submission from Patrick Reader : Per bpo-41263, code.__new__ now uses Argument Clinic. However, it still has a / marker which prevents the use of keyword arguments (https://github.com/python/cpython/pull/21426/files#diff-6f869eb8beb7cbe4bc6817584b99ad567f88962fa67f7beca25d009dc401234dR465

[issue42167] Documentation for SETUP_WITH opcode is wrong

2021-07-27 Thread Patrick Reader
Patrick Reader added the comment: It was, at least partially, replaced by BEGIN_WITH for bpo-40222: https://github.com/python/cpython/commit/adcd2205565f91c6719f4141ab4e1da6d7086126#diff-eaa488fc50d23b30ca8b24ab19e9c91c1c941339847af993e908f006eec0653bL741 -- versions: +Python 3.11

[issue44643] importing does not dispatch to __builtins__.__getitem__ to lookup __import__

2021-07-15 Thread Patrick Reader
Patrick Reader added the comment: Ok what I meant was, why does constructing a class use it when it looks up __build_class__ then? -- ___ Python tracker <https://bugs.python.org/issue44

[issue44643] importing does not dispatch to __builtins__.__getitem__ to lookup __import__

2021-07-15 Thread Patrick Reader
Patrick Reader added the comment: Similarly, when passing a subclass of dict to exec or eval as the locals or globals, all other instructions dispatch to the correct __getitem__ method. I'm pretty sure that's not CPython-private -- ___ Python

[issue44643] importing does not dispatch to __builtins__.__getitem__ to lookup __import__

2021-07-15 Thread Patrick Reader
Patrick Reader added the comment: It may be, but in that case, why do LOAD_BUILD_CLASS and things still use it? -- ___ Python tracker <https://bugs.python.org/issue44

[issue44643] importing does not dispatch to __builtins__.__getitem__ to lookup __import__

2021-07-15 Thread Patrick Reader
New submission from Patrick Reader : When a frame's __builtins__ is a subclass of dict with an overridden __getitem__ method, this overriden method is not used by the IMPORT_NAME instruction to lookup __import__ in the dictionary; it uses the lookup function of normal dictionaries (via

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-06-24 Thread Patrick Reader
Patrick Reader added the comment: I would like to note that syntax like this is in heavy use in the Code Golf community (a sport in which the aim is to write the shortest code possible to complete a particular task). It will be disappointing if it becomes an error and break many past

[issue43726] regex module fails with a quantified backref but succeeds with repeated backref

2021-04-04 Thread Patrick Reader
Patrick Reader added the comment: The `regex` module is a third-party package, not part of the Python standard library. Please report issues here: https://bitbucket.org/mrabarnett/mrab-regex/issues -- nosy: +pxeger ___ Python tracker <ht

[issue43480] Add .path method/property to tempfile.* for a pathlib.Path

2021-03-12 Thread Patrick Reader
New submission from Patrick Reader : It would be nice to have a `.path` method or property on `tempfile.NamedTemporaryFile`, `tempfile.TemporaryDirectory` which produces a `pathlib.Path` of their `.name` attribute, so one can use the modern interface directly. I think a method would be more

[issue42754] Unpacking of literals inside other literals should be optimised away by the compiler

2020-12-26 Thread Patrick Reader
Change by Patrick Reader : -- type: -> performance ___ Python tracker <https://bugs.python.org/issue42754> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue42754] Unpacking of literals inside other literals should be optimised away by the compiler

2020-12-26 Thread Patrick Reader
New submission from Patrick Reader : When unpacking a collection or string literal inside another literal, the compiler should optimise the unpacking away and store the resultant collection simply as another constant tuple, so that `[*'123', '4', '5']` is the exact same as `['1', '2', '3

[issue41781] Typos in typing.py

2020-12-26 Thread Patrick Reader
Patrick Reader added the comment: Maybe I added myself by accident while reading the code. Anyway, thanks and you're welcome -- ___ Python tracker <https://bugs.python.org/issue41

[issue42167] Documentation for SETUP_WITH opcode is wrong

2020-10-27 Thread Patrick Reader
New submission from Patrick Reader : bpo-33387 introduced two new opcodes, `RERAISE` and `WITH_EXCEPT_START` (previously called `WITH_EXCEPT_FINISH`), replacing the previous `WITH_CLEANUP_START`, `WITH_CLEANUP_FINISH`, `BEGIN_FINALLY`, `END_FINALLY`, `CALL_FINALLY` and `POP_FINALLY

[issue41997] Docs Standard Library index page has incorrect version in title

2020-10-10 Thread Patrick Reader

[issue41997] Docs Standard Library index page has incorrect version in title

2020-10-10 Thread Patrick Reader
New submission from Patrick Reader : The documentation page for the Standard Library, https://docs.python.org/3/library/, still says "Python 3.8.6 documentation" in the title. When visiting https://docs.python.org/3.9/library/ (emphasis on the 3.9) explicitly, the correct title i

[issue41996] Should `make install` still install to /usr/bin/python3?

2020-10-10 Thread Patrick Reader
New submission from Patrick Reader : Since Python 2 is now finally gone, should the Python executable not be installed to simply `/usr/bin/python` rather than `/usr/bin/python3` when running `make install`? -- components: Installation messages: 378387 nosy: pxeger priority: normal

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-08 Thread Patrick Reader
Patrick Reader added the comment: Sorry, I'd completely forgotten about doing a PR for this. Go ahead! -- ___ Python tracker <https://bugs.python.org/issue41

[issue41805] types.GenericAlias and types.Union have no documentation

2020-09-17 Thread Patrick Reader
New submission from Patrick Reader : See title. For reference: `GenericAlias` was added by Guido van Rossum in commit 48b069a003ba6c684a9ba78493fbbec5e89f10b8 "bpo-39481: Implementation for [PEP 585](https://www.python.org/dev/peps/pep-0585/) (#18239)" `Union` was added by

[issue41792] No (public) way to dynamically introspect if an annotation is a TypedDict

2020-09-15 Thread Patrick Reader
Change by Patrick Reader : -- keywords: +patch pull_requests: +21309 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22254 ___ Python tracker <https://bugs.python.org/issu

[issue41792] No (public) way to dynamically introspect if an annotation is a TypedDict

2020-09-15 Thread Patrick Reader
New submission from Patrick Reader : See https://github.com/python/typing/issues/751 -- components: Library (Lib) messages: 376931 nosy: pxeger priority: normal severity: normal status: open title: No (public) way to dynamically introspect if an annotation is a TypedDict

[issue41781] Typos in typing.py

2020-09-14 Thread Patrick Reader
New submission from Patrick Reader : In typing.py, the `_allow_reckless_class_cheks` function is spelt wrong, and there is also a typo `instnance` in its docstring. I can do a PR but I thought I'd open an issue since it might be considered a breaking change (although it is `_private` so

[issue41203] Replace references to OS X in documentation with macOS

2020-07-04 Thread Patrick Reader
Change by Patrick Reader : -- keywords: +patch pull_requests: +20468 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21316 ___ Python tracker <https://bugs.python.org/issu

[issue41203] Replace references to OS X in documentation with macOS

2020-07-04 Thread Patrick Reader
Patrick Reader added the comment: While I'm at it, should I change "Macintosh" to "Mac"? -- ___ Python tracker <https://bugs.python.org/issue41203> ___ _

[issue41203] Replace references to OS X in documentation with macOS

2020-07-04 Thread Patrick Reader
Patrick Reader added the comment: I'm working on it -- ___ Python tracker <https://bugs.python.org/issue41203> ___ ___ Python-bugs-list mailing list Unsub

[issue41203] Replace references to OS X in documentation with macOS

2020-07-03 Thread Patrick Reader
New submission from Patrick Reader : Since 10.12 (Sierra, released in 2016), macOS is no longer called OS X. References to macOS in the documentation should be updated to reflect this. This is now especially important because macOS 11 (Big Sur) is now in preview, and the X meaning 10