Raymond Hettinger added the comment:
> Why is not PEP 630 enough?
My understanding is that this entire class of code changes has been put on hold
pending Steering Council approval. It represents a great deal of code churn
and creation on new APIs. Several of the patches had had negat
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue45530>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
New changeset 5afa0a411243210a30526c7459a0ccff5cb88494 by Raymond Hettinger in
branch 'main':
bpo-4: Remove deprecated support for non-integer values (GH-28983)
https://github.com/python/cpython/commit/5afa0a411243210a30526c7459a0cc
New submission from Raymond Hettinger :
When someone requests help(range), help(zip), help(property), or
help(classmethod), the expectation and need is to see something like what is
shown in main documentation rather than being subjected to a listing of every
standard dunder method.
It
Change by Raymond Hettinger :
--
pull_requests: +27270
pull_request: https://github.com/python/cpython/pull/28983
___
Python tracker
<https://bugs.python.org/issue42
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue45483>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
> These macros can be abused to be used as l-value
You could simply document, "don't do that". Also if these is a need to make an
assignment, you're now going to have to create a new setter function to fill
the need.
We really d
Raymond Hettinger added the comment:
Evgeniy, please leave this closed and take the proposal to the python-ideas
mailing list. There is no further progress that can be made in this tracker
issue. We can’t discern any part of your proposal that would make sense for
improving the language
Raymond Hettinger added the comment:
It looks like the error is in inspect.formatannotation().
For instances of type, that function incorrectly returns only
annotation.__qualname__.
Instead, it should return repr(annotation) which would include the args
New submission from Raymond Hettinger :
In the example below, __annotations__ is correct but not the corresponding
Signature object.
---
from typing import List
def f(s: List[float]) -> None: pass
def g(s: list[fl
Raymond Hettinger added the comment:
It may have been a mistake to allow this kind of decorator chaining.
* As Randolf and Alex have noticed, it invalidates assumptions made elsewhere
in the standard library and presumably in third-party code as well.
* And as Randolf noted in his last
Raymond Hettinger added the comment:
Moving this discussion to issue 45356 because some of the discussion would need
to be duplicated.
--
nosy: +rhettinger
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder: -> Calling `he
Raymond Hettinger added the comment:
I'm merging issue 44904 into this one because they are related.
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/is
Raymond Hettinger added the comment:
I'm surprised no one else noticed this until now.
The doc search finds some entries such as: "sum", "min", "max", and
"enumerate". However, it is missing others such as: &quo
Raymond Hettinger added the comment:
As Serhiy says, this is a known issue that we can't do anything about until
signature objects become more expressive. The C code already has comments such
as:
/* AC: cannot convert yet, waiting for *args support */
/* AC: cannot conver
Raymond Hettinger added the comment:
Where are capabilities like "list[str]" and "dict[str, list[int]]" going to be
documented?
--
___
Python tracker
<https://bug
Raymond Hettinger added the comment:
[Eric]
> I agree that there's no good way of telling if an
> arbitrary class is immutable, so I'm not sure we can
> do anything here.
Consider using non-hashability as a proxy indicator for immutability.
- isinstance(f.defaul
Raymond Hettinger added the comment:
Related: https://bugs.python.org/issue45347
--
___
Python tracker
<https://bugs.python.org/issue44831>
___
___
Python-bug
Raymond Hettinger added the comment:
Related: https://bugs.python.org/issue44831
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue45
Change by Raymond Hettinger :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Raymond Hettinger added the comment:
New changeset 72089f33c0aed391f047b1cbaf19d8da1e51c167 by Miss Islington (bot)
in branch '3.10':
bpo-45346: Keep docs consistent regarding true and false values (GH-28697)
(GH-28698)
https://github.com/python/cpyt
Raymond Hettinger added the comment:
New changeset db91b058d5d4fbff4185982095d90fe6a2741aed by Raymond Hettinger in
branch 'main':
bpo-45346: Keep docs consistent regarding true and false values (GH-28697)
https://github.com/python/cpython/commit/db91b058d5d4fbff4185982095d90f
Change by Raymond Hettinger :
--
keywords: +patch
pull_requests: +27056
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28697
___
Python tracker
<https://bugs.python.org/issu
Change by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
nosy: +rhettinger
type: enhancement ->
___
Python tracker
<https://bugs.python.org/i
Raymond Hettinger added the comment:
The elements() method is working correctly:
>>> from collections import Counter
>>> aCounter = Counter('abracadabra')
>>> list(aCounter.elements())
['a', 'a', 'a', 'a&
Raymond Hettinger added the comment:
Given that there isn't an actual bug here, please move this discussion to
python-ideas.
--
nosy: +rhettinger
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python t
Raymond Hettinger added the comment:
Kapil, this behavior was intentional (not a bug), but later regarded as a
design mistake. GvR has said that if he had to do it over again list.__iadd__
would only accept other lists. The problem arises when people write "somelist
+= 'hello
Raymond Hettinger added the comment:
This is one bit of symmetry that we shouldn't pursue. The find() methods have
been a recurring source of bugs because of failing to check for a -1 result but
having that be a valid index into the sequence.
Also, the sequence APIs are long establ
Change by Raymond Hettinger :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Raymond Hettinger added the comment:
New changeset 8c21941ddafdf4925170f9cea22e2382dd3b0184 by Alexander Böhn in
branch 'main':
bpo-39549: reprlib.Repr uses a “fillvalue” attribute (GH-18343)
https://github.com/python/cpython/commit/8c21941ddafdf4925170f9cea22e23
Raymond Hettinger added the comment:
> Overall, I expect the improved sharing to more than
> compensate for the disadvantages.
I expect the opposite. This makes all dicts pay a price (in space,
initialization time, and complexity) for a micro-optimization of an uncommon
case (the
Raymond Hettinger added the comment:
This is expected behavior.
To get a better understanding, see:
https://docs.python.org/3/faq/programming.html#why-did-changing-list-y-also-change-list-x
To get help writing correct code, please do not use the bug tracker. Consider
posting to
Raymond Hettinger added the comment:
The underscore functions are private and for internal use. There is no
_heappush_max() because we didn't need it internally and it would just be dead
code.
Thanks for the report.
--
resolution: -> not a bug
stage: -> resolved
s
Change by Raymond Hettinger :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Raymond Hettinger added the comment:
New changeset 9a0dcc5b2e04d9c51350107734f12a1cbc0284a7 by Raymond Hettinger in
branch 'main':
bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494)
https://github.com/python/cpython/commit/9a0dcc5b2e04d9c51
Raymond Hettinger added the comment:
> Thank you for looking into this.
You're welcome :-)
> Would it make sense to change list.sort() in the same way?
I think not. This is a such a minor point and is a distractor. Most users
would be better off focusing on the
Change by Raymond Hettinger :
--
pull_requests: +26889
pull_request: https://github.com/python/cpython/pull/28494
___
Python tracker
<https://bugs.python.org/issue45
Raymond Hettinger added the comment:
> I created a PR from my last patch, inlining the unpacking
> of single digit integers.
Thanks, that gets to the heart of the issue.
I marked the PR as approved (though there is a small coding nit you may want t
Raymond Hettinger added the comment:
-0 on this. While it is true that __lt__ is used, we don't really want people
to exploit that fact. Doing so will get them into trouble elsewhere. For
example, max(seq) uses __gt__. Also, when mixing types, a return of
NotImplemented will trig
Raymond Hettinger added the comment:
False alarm. I misread the diff. All is well.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Raymond Hettinger :
--
resolution: fixed ->
status: closed ->
___
Python tracker
<https://bugs.python.org/issue34451>
___
___
Python-bugs-list
Change by Raymond Hettinger :
--
Removed message: https://bugs.python.org/msg402274
___
Python tracker
<https://bugs.python.org/issue34451>
___
___
Python-bug
Raymond Hettinger added the comment:
False alarm. I misread the diff. All is well.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Raymond Hettinger added the comment:
New changeset 9510e6f3c797b4398aaf58abc1072b9db0a644f9 by Raymond Hettinger in
branch 'main':
bpo-45155: Apply new byteorder default values for int.to/from_bytes (GH-28465)
https://github.com/python/cpython/commit/9510e6f3c797b4398aaf58abc1072b
Change by Raymond Hettinger :
--
pull_requests: +26879
pull_request: https://github.com/python/cpython/pull/28465
___
Python tracker
<https://bugs.python.org/issue45
Raymond Hettinger added the comment:
> OTOH on my Mac I still find that 3.10 with PGO is still
> more than twice as slow than 2.7.
> Thinking about it that's a bit odd, since (presumably)
> the majority of the work in sum() involves a long int result
> (even though th
Raymond Hettinger added the comment:
If you close this out, consider adding a prominent comment so that the issue
will be on the minds of people looking at this code.
--
nosy: +rhettinger
status: pending -> open
___
Python tracker
<
Raymond Hettinger added the comment:
Also a test should be added to make sure the weakref callbacks are still
occurring.
--
___
Python tracker
<https://bugs.python.org/issue39
Raymond Hettinger added the comment:
I'm thinking that edit to tp_dealloc was incorrect. The PyClear call should
have been replaced (not removed) with the pattern shown in the C APIs docs (
https://docs.python.org/3/extending/newtypes.html?highlight=pyobject_clearw#weak-reference-su
Raymond Hettinger added the comment:
I concur with Ma Lin.
--
___
Python tracker
<https://bugs.python.org/issue45116>
___
___
Python-bugs-list mailing list
Unsub
Change by Raymond Hettinger :
--
assignee: -> rhettinger
___
Python tracker
<https://bugs.python.org/issue39549>
___
___
Python-bugs-list mailing list
Un
Raymond Hettinger added the comment:
Is the subinterpreters work still on hold pending a PEP?
I thought that conversions to heap types had been suspended because there is a
Steering Council level cost benefit decision. Mostly it seems that everything
helps subinterpreters makes code worse
Change by Raymond Hettinger :
--
nosy: +tim.peters
___
Python tracker
<https://bugs.python.org/issue45216>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Raymond Hettinger :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Raymond Hettinger added the comment:
New changeset 94b462686b7dfabbd69cc9401037d736d71c4dc2 by Raymond Hettinger in
branch 'main':
bpo-45198: __set_name__ documentation not clear about its usage with
non-descriptor classes (GH-28439)
https://github.com/python/cpyt
Change by Raymond Hettinger :
--
assignee: -> rhettinger
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python
Raymond Hettinger added the comment:
New changeset a18d52269ab6071a605d6c72f6af585a4c533ca4 by Miss Islington (bot)
in branch '3.9':
bpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420)
(GH-28443)
https://github.com/python/cpyt
Raymond Hettinger added the comment:
New changeset 6e4101add568910409294554c8e863226a66bb64 by Miss Islington (bot)
in branch '3.10':
bpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420)
(GH-28442)
https://github.com/python/cpyt
Raymond Hettinger added the comment:
New changeset a6e8db5e8e6780411db749d404715dbe021647c7 by Adam Schwalm in
branch 'main':
bpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420)
https://github.com/python/cpython/commit/a6e8db5e8e6780411db749d404715d
Raymond Hettinger added the comment:
> Raymond, do you think we should also freeze the dependencies
> of runpy (so "python -m " also starts faster)?
Yes, please.
The '-m' load option can be considered core startup functionality. It is often
the recommended
Raymond Hettinger added the comment:
It would be nice to freeze argparse.py and its dependencies. For command-line
tools, startup time is important.
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue45
Change by Raymond Hettinger :
--
keywords: +patch
pull_requests: +26844
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28439
___
Python tracker
<https://bugs.python.org/issu
Raymond Hettinger added the comment:
Pablo, should this be a release blocker?
--
nosy: +lemburg, pablogsal
___
Python tracker
<https://bugs.python.org/issue45
Raymond Hettinger added the comment:
> Right now, I'm not sure. The heuristic to decide
> if a function is inlined or not seems to depend
> a lot on the compiler and the compiler options.
That is exactly correct. And it is why we should
use the macro form which is certain
Raymond Hettinger added the comment:
> Subclass of set can now define a __new__() method with
> additional keyword parameters without overriding also __init__().
Is there any use case for this? Offhand, I can't think of any reason.
The new code in set.__init__ is somewhat op
Raymond Hettinger added the comment:
Confirmed that this weird behavior is still present. Am not sure when someone
will have the time and inclination to drill into the cause.
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.
Change by Raymond Hettinger :
--
nosy: +lukasz.langa
___
Python tracker
<https://bugs.python.org/issue38085>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43574>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
Thanks for the PR.
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Raymond Hettinger added the comment:
New changeset a59ede244714455aa9ee8637608e019a20fa2ca6 by speedrun-program in
branch 'main':
bpo-45225: use map function instead of genexpr in capwords (GH-28342)
https://github.com/python/cpython/commit/a59ede244714455aa9ee8637608e01
Raymond Hettinger added the comment:
In Python3.10, "optional arguments" has been replaced with "options".
We didn't backport the change because it risks breaking tests that rely on
exact string matches. Also, it was really a bug, it was just an unfortunate
ch
Raymond Hettinger added the comment:
These should be changed back to macros where inlining is guaranteed.
--
___
Python tracker
<https://bugs.python.org/issue45
Raymond Hettinger added the comment:
You are correct that __set_name__ works for non-descriptor classes as well.
The docs for it should be moved out of the "Implementing Descriptors" section.
Also, it should have a non-descriptor example.
--
assignee: docs@python -> rh
New submission from Raymond Hettinger :
I got this today running a stock Python 3.9.6 for macOS downloaded from
python.org.
-
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/3.
Raymond Hettinger added the comment:
Just reread the thread. AFAICT not a single use case was presented for having
system byte ordering as the default. However, multiple respondents have
pointed out that a default to system byte ordering is a bug waiting to happen,
almost ensuring that
Raymond Hettinger added the comment:
Interestingly, "little" is faster than "big".
$ python3.10 -m timeit -r11 -s 'x=3452452454524' 'x.to_bytes(10, "little")'
500 loops, best of 11: 82.7 nsec per loop
$ python3.10 -m timeit -r11 -s '
Raymond Hettinger added the comment:
[Mark Dickinson]
> I'd also really like to avoid a system-dependent default.
[Petr Viktorin]
> Exactly, a platform-dependent default is a bad idea.
I concur with Petr and Mark.
The principal use case for int.to_bytes is to convert an
Raymond Hettinger added the comment:
Serhiy is likely thinking of other the other cases. Prior to this discussion,
the principal use for to_bytes and from_bytes was for integers larger than a
single byte. If we're going to add a *byteorder* default, it needs to make
sense for those
Change by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11
___
Python tracker
<https://bugs.python
Change by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python
Raymond Hettinger added the comment:
New changeset 89edd18779e382c5fa7f57722b0b897a907ed2c4 by Miss Islington (bot)
in branch '3.10':
bpo-45024 and bpo-23864: Document how interface testing works with the
collections ABCs (GH-28218) (GH-28266)
https://github.com/python/cpyt
Raymond Hettinger added the comment:
New changeset 89edd18779e382c5fa7f57722b0b897a907ed2c4 by Miss Islington (bot)
in branch '3.10':
bpo-45024 and bpo-23864: Document how interface testing works with the
collections ABCs (GH-28218) (GH-28266)
https://github.com/python/cpyt
Raymond Hettinger added the comment:
New changeset 62fa613f6a6e872723505ee9d56242c31a654a9d by Raymond Hettinger in
branch 'main':
bpo-45024 and bpo-23864: Document how interface testing works with the
collections ABCs (GH-28218)
https://github.com/python/cpyt
Raymond Hettinger added the comment:
New changeset 62fa613f6a6e872723505ee9d56242c31a654a9d by Raymond Hettinger in
branch 'main':
bpo-45024 and bpo-23864: Document how interface testing works with the
collections ABCs (GH-28218)
https://github.com/python/cpyt
Raymond Hettinger added the comment:
Perhaps instead of the system byte ordering, choose one for the default so that
default encoding/decoding will work cross platform. I think "little" is the
most common (intel and arm).
--
nosy: +
Raymond Hettinger added the comment:
Idea for improving unmarshalling speed: Since reading PYCs is I/O bound, it
may be worthwhile to compress them. When the idea came up previously, Antoine
suggested choosing an algorithm with the fastest possible decompression speed
(iirc, it was lzma4
Raymond Hettinger added the comment:
Thanks for the link. This is a worthwhile experiment. However, the potential
gains will be hard to come by.
The workload of LOAD_CONST is very small. After paying for the usual dispatch
logic overhead, all it does is an index into a struct member and
Raymond Hettinger added the comment:
I didn't know this was in the works. Can you point me to the relevant
discussion about why LOAD_CONST would be split?
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/is
Raymond Hettinger added the comment:
The pow() docs could use substantial updating. All of the logic for pow() is
implemented in base.__pow__(exp, [mod]). Technically, it isn't restricted to
numeric types, that is just a norm. The relationship between "pow(a,b)" and
&quo
Raymond Hettinger added the comment:
In pure python, generators are implemented as functions. In CPython, the only
way to implement them is as a class. From a user's point of view, enumerate(),
map(), zip(), and filter() are used like a functions (they doesn't have
non-dund
Raymond Hettinger added the comment:
New directives introduce complexity. They should be saved for pervasive and
non-trivial problems.
The motivation for this change is dubious (that a translator can't easily
handle a simple fixed string pattern). The OP grants that this is a "o
Change by Raymond Hettinger :
--
assignee: steven.daprano -> rhettinger
___
Python tracker
<https://bugs.python.org/issue20499>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
New changeset 3c30805b58421a1e2aa613052b6d45899f9b1b5d by Raymond Hettinger in
branch '3.10':
[3.10] bpo-20499: Rounding error in statistics.pvariance (GH-28230) (GH-28248)
https://github.com/python/cpython/commit/3c30805b58421a1e2aa613052b6d45
Change by Raymond Hettinger :
--
pull_requests: +26669
pull_request: https://github.com/python/cpython/pull/28248
___
Python tracker
<https://bugs.python.org/issue20
Change by Raymond Hettinger :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Raymond Hettinger added the comment:
New changeset 4a5cccb02bb2254634c0fbb2cbb14e2e7f45e2d5 by Raymond Hettinger in
branch 'main':
bpo-20499: Rounding error in statistics.pvariance (GH-28230)
https://github.com/python/cpython/commit/4a5cccb02bb2254634c0fbb2cbb14e
Change by Raymond Hettinger :
--
title: Simplify source links in documentation? -> Docs: More surrounding text
into the "source" directive
versions: +Python 3.11
___
Python tracker
<https://bugs.pytho
Raymond Hettinger added the comment:
ISTM that translating this fixed pattern is possibly one of the simplest things
a translator will be asked to do, so there is very little payoff to making the
change.
For a person writing the docs, it is best to leave it as-is so that the wording
and
Change by Raymond Hettinger :
--
nosy: +rhettinger
nosy_count: 4.0 -> 5.0
pull_requests: +26650
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28230
___
Python tracker
<https://bugs.python.org/i
Change by Raymond Hettinger :
--
keywords: +patch
nosy: +rhettinger
nosy_count: 11.0 -> 12.0
pull_requests: +26644
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28218
___
Python tracker
<https://bugs.p
401 - 500 of 9609 matches
Mail list logo