Raymond Hettinger added the comment:
Looking again, it seems to someone has already started applying class markup
despite previous decisions not to do so.
--
resolution: rejected ->
status: closed -> open
versions: -Python 3.6, Python 3.7, Pyth
Raymond Hettinger added the comment:
In general, we've decided not to do this. We use function mark-up in the
section on builtin functions even though many of these are actually types.
We use class markup in other sections because that markup is well suited to
listing all the assoc
Raymond Hettinger added the comment:
Except for that, the PR looks fine. Leaving this open to see what Benjamin
thinks.
--
resolution: rejected ->
status: closed -> open
___
Python tracker
<https://bugs.python.org/i
Raymond Hettinger added the comment:
Let's leave the example as-is. The principal use case for these objects is to
pass them into other APIs that require file-like objects. Those can't always
be put in a context manager. For this example, we mainly want to communicate
tha
Raymond Hettinger added the comment:
* Changed the table order to match norms.
* Not adding and for variables because that is outside the norm (likely because
variables aren't operators).
* Keeping the existing terminology which is standard and historically hasn't
been a problem.
Raymond Hettinger added the comment:
New changeset 072ec69af592611f36349f5048569ab7e72b8b61 by Miss Islington (bot)
in branch '3.9':
bpo-43837: Reverse order of precedence table to show tightly binding operators
first (GH-25469) (GH-25472)
https://github.com/python/cpyt
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43889>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
New changeset 68ba0c67cac10c2545ea3b62d8b161e5b3594edd by Ammar Askar in branch
'master':
bpo-43837: Reverse order of precedence table to show tightly binding operators
first (GH-25469)
https://github.com/python/cpyt
Change by Raymond Hettinger :
--
assignee: rhettinger ->
___
Python tracker
<https://bugs.python.org/issue43837>
___
___
Python-bugs-list mailing list
Un
Raymond Hettinger added the comment:
Let's reverse the table in accordance with the de facto standard.
--
___
Python tracker
<https://bugs.python.org/is
Raymond Hettinger added the comment:
Considering Oscar's response, Mark's comments, and prior discussions, we should
close this. No strong use cases have emerged that would warrant overturning
the long-standing prior decisions on this topic.
--
resolution: -> r
Raymond Hettinger added the comment:
I recommend just letting this be. Aside from it allowing for a cute riddle, in
the real world seems to be harmless and not worth breaking code.
There are lots of other harmless oddities such as the space-invader increment
operator:
x -=- 1
FWIW, a
Change by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
___
Python tracker
<https://bugs.python.org/issue43837>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
The multiprocessing.Queue() instance will accumulate messages regardless of
whether a producer or consumer is started first.
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43857>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
Would it be more reasonable to provide a default name (which is what the PR
does) or to raise an exception?
--
___
Python tracker
<https://bugs.python.org/issue43
Change by Raymond Hettinger :
--
nosy: +paul.j3, rhettinger
___
Python tracker
<https://bugs.python.org/issue43874>
___
___
Python-bugs-list mailing list
Unsub
Raymond Hettinger added the comment:
For me, it is the opposite. I would have been completely surprised if setting
nargs caused an optional argument to become required.
The "nargs" parameter is entirely about the number of data arguments, not about
the option itself. When nar
Change by Raymond Hettinger :
--
nosy: +pitrou
___
Python tracker
<https://bugs.python.org/issue43879>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Raymond Hettinger :
--
nosy: -rhettinger, scoder, superbobry
___
Python tracker
<https://bugs.python.org/issue28254>
___
___
Python-bugs-list mailin
Raymond Hettinger added the comment:
ISTM the call count is too indirect to provide a useful indicator of coverage.
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43
Raymond Hettinger added the comment:
If reactivated, the tool needs to be substantially improved. It is NOT smart.
The false positives for slicing and logging examples are unnecessarily
annoying. It creates a barrier for people submitting documentation patches.
Each of the 367 entries
Raymond Hettinger added the comment:
s/hundred/hundred thousand/
--
___
Python tracker
<https://bugs.python.org/issue37596>
___
___
Python-bugs-list mailin
Raymond Hettinger added the comment:
> Would it be reasonable to make it so that sets are
> always created with the definition order?
No, it would not. We would also have to maintain order across set operations
such as intersection which which would become dramatically more expens
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43813>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
Serhiy, what do you think? Would it make sense to pass through the underlying
hash? I don't think there is much use for this but don't see any particular
reason to block it.
--
nosy: +rhettinger, serhiy.storchaka
priority: nor
Raymond Hettinger added the comment:
This isn't a bug because the MappingProxy doesn't promise to do early detection
and because it can't really be accomplished cleanly.
Perfect detection of non-mappings isn't possible. Some easy, minimal checks
are made for e
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43776>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
> I'm loathe to guarantee anything about this in the language itself.
There aren't language any guarantees being proposed. Letting the hash depend
on the object id just helps avoid quadratic behavior. Making float('NaN') a
sing
Raymond Hettinger added the comment:
FWIW, I've only looked at the lru_cache() code. Someone should go through all
the PyModule_GetState calls to see if they are on a critical path. AFAICT a
huge number of these changes were applied without regard to whether or not they
occurred
Raymond Hettinger added the comment:
Serhiy, do you think we could substitute the "self" instance of
functools._lru_cache_wrapper object for the kw_mark? It already compares on
identity, so it should be just a fast as the instance of object(). AFAICT,
kwd_mark doesn't ha
Raymond Hettinger added the comment:
State lookups and indirections were added to most performance sensitive code
part of the
_functools_state *state;
state = get_functools_state_by_type(Py_TYPE(self));
if (state == NULL) {
return NULL;
}
key = lru_cache_make_key
Change by Raymond Hettinger :
--
assignee: -> rhettinger
___
Python tracker
<https://bugs.python.org/issue43475>
___
___
Python-bugs-list mailing list
Un
Raymond Hettinger added the comment:
> Currently there is no way to tell if the *attribute*
> is read-only, read-write or write-only.
Read-only is segregated in the help() output.
>>> class A:
@property
def computed_field(self):
'
Raymond Hettinger added the comment:
Thanks for the PR
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Raymond Hettinger added the comment:
New changeset 28fb2d1c4dbf16b05acfb20d457b08e049a7c83f by Miss Islington (bot)
in branch '3.9':
bpo-43739: Add type declaration Doc/extending/extending.rst example (GH-25333)
https://github.com/python/cpyt
Raymond Hettinger added the comment:
New changeset 3a3c0464bd719a8cac6e52b02a3479b2834b88a4 by Miss Islington (bot)
in branch '3.8':
bpo-43739: Add type declaration Doc/extending/extending.rst example (GH-25332)
https://github.com/python/cpyt
Change by Raymond Hettinger :
--
nosy: +scoder
___
Python tracker
<https://bugs.python.org/issue43739>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
New changeset ea9b2d631902238acf69e51af6e3d308567b5dfd by Shreyan Avigyan in
branch 'master':
bpo-43739: Add type declaration Doc/extending/extending.rst example
https://github.com/python/cpython/commit/ea9b2d631902238acf69e51af6e3d3
Raymond Hettinger added the comment:
I just checked with another Python expert who reported:
"""
I have never once in my whole life seen or used a negative modulo. And that
says a lot given that 6 years of it was spent studying math. Including a few
years in a math PhD progr
Raymond Hettinger added the comment:
Mark, is there any reason hash(float('NaN')) and hash(Decimal('NaN')) have to
be a constant? Since NaNs don't compare equal, the hash homomorphism has no
restrictions. Why not have hash() return the id() like we do for
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43784>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
Mariatta, do you know who to refer this to?
--
nosy: +Mariatta, rhettinger
___
Python tracker
<https://bugs.python.org/issue43
Raymond Hettinger added the comment:
For named tuples, there isn't an include/exclude option, so no extra mention is
warranted.
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/is
Raymond Hettinger added the comment:
Negative modulo divisors is not a "beginner friendly" topic or even remotely
relevant to most users. It is also trivially discoverable with a few seconds
of experimentation at the interactive prompt. FWIW, I've read dozens of Python
tuto
Change by Raymond Hettinger :
--
nosy: -rhettinger
___
Python tracker
<https://bugs.python.org/issue43761>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
Thanks for adding this.
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43774>
___
___
Python-bug
Raymond Hettinger added the comment:
> Two days ago everything worked completely fine,
> and now this disaster happens.
It's unlikely that Python itself changed over those two days. It's more likely
that the data source has changed.
Try this in your notebook:
impor
Raymond Hettinger added the comment:
I agree with Steven that minor fact should not be given more weight. It has a
specification in the Reference and it own FAQ entry.
IMO it doesn't belong in tutorial because having a negative modulus is rare and
because burying the use in details
Change by Raymond Hettinger :
--
assignee: rhettinger ->
___
Python tracker
<https://bugs.python.org/issue43340>
___
___
Python-bugs-list mailing list
Un
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43766>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
> This change is currently not documented in the dataclass
> and namedtuple documentation,
I don't think we need to do that. In the end, __match_args__ will be added in
many places. The right place to document it is in the pattern ma
Raymond Hettinger added the comment:
> Just chiming in to say that for PyPy this API would be extremely useful
Thanks for that input. Given that there would be some value add, I withdraw my
objection.
> I proposed to declare it as a "static inline" function,
> but I
Raymond Hettinger added the comment:
I'll review this but it may take a little while to get to it.
--
assignee: -> rhettinger
nosy: +paul.j3, rhettinger
___
Python tracker
<https://bugs.python.org
Change by Raymond Hettinger :
--
nosy: +pablogsal, tim.peters
___
Python tracker
<https://bugs.python.org/issue43753>
___
___
Python-bugs-list mailing list
Unsub
Raymond Hettinger added the comment:
> Right now, there is no benefit for CPython.
Please don't this until we have a clear demonstrable benefit. As it stands
now, this is all cost and no benefit.
Adding unnecessary abstraction layers just makes it more difficult for people
to lea
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 028d5286d4255195ba6715e1aeb4bffed6b0279e by Miss Islington (bot)
in branch '3.9':
bpo-20503: Show how isinstance() works with ABC registered classes. (GH-25175)
(GH-25202)
https://github.com/python/cpyt
Raymond Hettinger added the comment:
New changeset 7bc25ec7276db2a81e7823671a74eeb8aa6b4542 by Raymond Hettinger in
branch 'master':
bpo-20503: Show how isinstance() works with ABC registered classes. (GH-25175)
https://github.com/python/cpyt
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 de0b2b133011953b02536cc78f2499d5d55224f8 by Miss Islington (bot)
in branch '3.9':
bpo-43325: Add FAQ entry for identity tests (GH-25168) (GH-25178)
https://github.com/python/cpython/commit/de0b2b133011953b02536cc78f2499
Raymond Hettinger added the comment:
New changeset f8775e4f72240faba3947eea8efdd83ee56ae1fd by Raymond Hettinger in
branch 'master':
bpo-43325: Add FAQ entry for identity tests (GH-25168)
https://github.com/python/cpython/commit/f8775e4f72240faba3947eea8efdd8
Change by Raymond Hettinger :
--
keywords: +patch
pull_requests: +23917
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25175
___
Python tracker
<https://bugs.python.org/issu
Raymond Hettinger added the comment:
I don't think there is any advantage in doing this. It will just break code
that has worked for a very long time.
This is the reason that the logging module wasn't changed to more modern naming
conventions.
--
nosy: +
Change by Raymond Hettinger :
--
keywords: +patch
pull_requests: +23914
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25173
___
Python tracker
<https://bugs.python.org/issu
Change by Raymond Hettinger :
--
assignee: rhettinger ->
___
Python tracker
<https://bugs.python.org/issue43721>
___
___
Python-bugs-list mailing list
Un
Change by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43721>
___
___
Python-
Change by Raymond Hettinger :
--
keywords: +patch
pull_requests: +23909
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25168
___
Python tracker
<https://bugs.python.org/issu
Raymond Hettinger added the comment:
Closing this due to lack of interest.
--
resolution: -> postponed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Raymond Hettinger added the comment:
There is moratorium on the / notation in the main docs. If that moratorium is
lifted, we sweep through the docs and apply it.
--
nosy: +rhettinger
resolution: -> later
stage: -> resolved
status: open -&g
Raymond Hettinger added the comment:
> Statically, in the stdlib, about 1 in a 1000 opcodes
> is an ADD_INT candidate.
I would expect that ADD_INT would typically occur in loops, so even if it is a
rare opcode statically, it will really count when it used.
--
nosy: +rhet
Raymond Hettinger added the comment:
This doesn't look simpler to me. We will forever lose mental clock cycles
disentangling the locals and cells. So, I don't think they should be
commingled.
--
nosy: +rhettinger
___
Python track
Raymond Hettinger added the comment:
> There are no specifications regarding the question.
>From the OrderedDict docs:
"""
Equality tests between OrderedDict objects are order-sensitive and are
implemented as list(od1.items())==list(od2.items()). Equality tests between
Raymond Hettinger added the comment:
Thanks for the bug report.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9
___
Python tracker
<https://bugs.python.or
Raymond Hettinger added the comment:
New changeset d104a786fff5980360056d908a2d952b42306171 by Miss Islington (bot)
in branch '3.9':
bpo-43677: Fix a minor error in Doc/howto/descriptor.rst (GH-25123) (#25140)
https://github.com/python/cpython/commit/d104a786fff5980360056d908a2d95
Raymond Hettinger added the comment:
New changeset e689cdca3c14aab8d2d454b79ddd661b238fd301 by Zackery Spytz in
branch 'master':
bpo-43677: Fix a minor error in Doc/howto/descriptor.rst (#25123)
https://github.com/python/cpython/commit/e689cdca3c14aab8d2d454b79ddd66
Change by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
___
Python tracker
<https://bugs.python.org/issue43677>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
Unfortunately, the existing behaviors are guaranteed and cannot be changing
without breaking code — the OrderedDict class was designed to be mostly
substitutable for regular dicts in existing code.
Personally, I think it would have been better if
Raymond Hettinger added the comment:
I prefer Terry's original proposal which is backwards compatible and gives the
user control over whether separator is to be applied to the fractional
component.
>>> format(12_34_56.12_34_56, '_._f') # Whole and fra
Change by Raymond Hettinger :
--
nosy: +rhettinger
versions: -Python 3.6, Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue43
Raymond Hettinger added the comment:
Thanks for the report.
This has already been fixed for the 3.9 release and later:
https://docs.python.org/3.9/howto/descriptor.html#functions-and-methods
It was minor enough to not warrant a backport to 3.8.
--
resolution: -> out of date
st
Change by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
priority: normal ->
___
Python tracker
<https://bugs.python.org/issue43632>
___
___
Raymond Hettinger added the comment:
I would think this would go without saying. The word "tutorial" means example
driven instruction. Previous to now, no one has ever reported confusion about
this.
--
nosy: +rhettinger
___
Pyth
Raymond Hettinger added the comment:
Here's how to use getstate() and setstate():
>>> import random
>>> state = random.getstate()
>>> random.choices('ABCDE', k=8)
['E', 'A', 'B', 'B', 'A', 'A
Raymond Hettinger added the comment:
Marking this as closed because the issue doesn't seem to have gathered much
interest. If someone wants to move this forward, I recommend discussing it on
python-ideas.
--
resolution: -> rejected
stage: -> resolved
status: ope
Raymond Hettinger added the comment:
As an immediate fix to your problem, replace this line:
random.shuffle(questions_element)
with:
questions = list(questions_element)
random.shuffle(questions)
questions_element[:] = questions
Raymond Hettinger added the comment:
New changeset 3bb19873abd572879cc9a8810b1db9db1f704070 by Raymond Hettinger in
branch 'master':
Revert "bpo-40521: Remove freelist from collections.deque() (GH-21073)"
(GH-24944)
https://github.com/p
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43625>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Raymond Hettinger :
--
nosy: +skip.montanaro
___
Python tracker
<https://bugs.python.org/issue43625>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
Some brief research
===
""" in numbers four or more digits long, use commas to set off groups of three
digits, counting leftward from the decimal point, in the standard American
style. For long decimal numbers, do not use
Raymond Hettinger added the comment:
IIRC there is ISO recommending that after the decimal point, digits be arranged
in groups of five. I think is also how printed reference tables are typically
formatted.
--
nosy: +mark.dickinson, rhettinger, serhiy.storchaka
Raymond Hettinger added the comment:
Interestingly, this isn't an LXML bug. It is a documented difference from how
the standard library works:
https://lxml.de/tutorial.html#elements-are-lists
So, if you want use random.shuffle(), you need the standard library ElementTree
inste
Change by Raymond Hettinger :
--
nosy: +scoder -skrah
___
Python tracker
<https://bugs.python.org/issue43616>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
The standard library isn't at fault here. Please file this an an LXML bug.
Reproducer:
from lxml.etree import Element
root = Element('outer')
root.append(Element('zero'))
root.append(Element('one
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 72789592a3491bab49f144bb292679b1484885d9 by Raymond Hettinger in
branch 'master':
bpo-43198: Revert 3dd2157 that removed freeslot tracking. (#25010)
https://github.com/python/cpython/commit/72789592a3491bab49f144bb292679
Change by Raymond Hettinger :
--
nosy: +skrah
___
Python tracker
<https://bugs.python.org/issue43618>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43618>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Raymond Hettinger :
--
nosy: +skrah
___
Python tracker
<https://bugs.python.org/issue43616>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue43616>
___
___
Python-bugs-list mailing list
Unsubscribe:
801 - 900 of 9609 matches
Mail list logo