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
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 syn
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
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
Change by Patrick Reader :
--
nosy: -terry.reedy
___
Python tracker
<https://bugs.python.org/issue44845>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
--
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
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
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
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
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
Change by Patrick Reader :
--
type: -> performance
___
Python tracker
<https://bugs.python.org/issue42754>
___
___
Python-bugs-list mailing list
Unsubscrib
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
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/is
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`.
The
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
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
Patrick Reader added the comment:
Sorry, I'd completely forgotten about doing a PR for this. Go ahead!
--
___
Python tracker
<https://bugs.python.org/is
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 Magg
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
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
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 `_privat
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
Patrick Reader added the comment:
While I'm at it, should I change "Macintosh" to "Mac"?
--
___
Python tracker
<https://bugs.python.org/issue41203>
___
Patrick Reader added the comment:
I'm working on it
--
___
Python tracker
<https://bugs.python.org/issue41203>
___
___
Python-bugs-list mailing list
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 in
31 matches
Mail list logo