[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Raymond Hettinger
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

[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Raymond Hettinger
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

[issue43834] Use context manager in StringIO example

2021-04-19 Thread Raymond Hettinger
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

[issue43834] Use context manager in StringIO example

2021-04-19 Thread Raymond Hettinger
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

[issue43837] Operator precedence documentation could be more clear

2021-04-19 Thread Raymond Hettinger
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.

[issue43837] Operator precedence documentation could be more clear

2021-04-19 Thread Raymond Hettinger
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

[issue43889] Pickle performance regression in 3.10

2021-04-19 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43889> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43837] Operator precedence documentation could be more clear

2021-04-19 Thread Raymond Hettinger
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

[issue43837] Operator precedence documentation could be more clear

2021-04-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker <https://bugs.python.org/issue43837> ___ ___ Python-bugs-list mailing list Un

[issue43837] Operator precedence documentation could be more clear

2021-04-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Let's reverse the table in accordance with the de facto standard. -- ___ Python tracker <https://bugs.python.org/is

[issue43602] Include Decimal's in numbers.Real

2021-04-18 Thread Raymond Hettinger
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

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

2021-04-18 Thread Raymond Hettinger
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

[issue43837] Operator precedence documentation could be more clear

2021-04-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker <https://bugs.python.org/issue43837> ___ ___ Python-bugs-list mai

[issue43877] Logging Cookbook ambiguity

2021-04-17 Thread Raymond Hettinger
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

[issue43857] Fix the AttributeError message for deletion of a missing attribute

2021-04-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43857> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43874] argparse crashes on subparsers with no dest/metava

2021-04-17 Thread Raymond Hettinger
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

[issue43874] argparse crashes on subparsers with no dest/metava

2021-04-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +paul.j3, rhettinger ___ Python tracker <https://bugs.python.org/issue43874> ___ ___ Python-bugs-list mailing list Unsub

[issue43876] argparse documentation contrasting nargs '*' vs. '+' is misleading

2021-04-17 Thread Raymond Hettinger
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

[issue43879] Add native_thread_id to PyThreadState

2021-04-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +pitrou ___ Python tracker <https://bugs.python.org/issue43879> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: -rhettinger, scoder, superbobry ___ Python tracker <https://bugs.python.org/issue28254> ___ ___ Python-bugs-list mailin

[issue43860] unittest increment tests executed

2021-04-15 Thread Raymond Hettinger
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

[issue42238] Deprecate suspicious.py?

2021-04-15 Thread Raymond Hettinger
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

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-04-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: s/hundred/hundred thousand/ -- ___ Python tracker <https://bugs.python.org/issue37596> ___ ___ Python-bugs-list mailin

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-04-15 Thread Raymond Hettinger
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

[issue43813] Denial of service on http.server module with large request method.

2021-04-13 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43813> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43829] MappingProxyType cannot hash a hashable underlying mapping

2021-04-13 Thread Raymond Hettinger
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

[issue43828] MappingProxyType accepts string

2021-04-13 Thread Raymond Hettinger
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

[issue43776] Popen with shell=True yield mangled repr output

2021-04-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43776> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-04-10 Thread Raymond Hettinger
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

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-10 Thread Raymond Hettinger
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

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-10 Thread Raymond Hettinger
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

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-10 Thread Raymond Hettinger
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

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-04-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker <https://bugs.python.org/issue43475> ___ ___ Python-bugs-list mailing list Un

[issue39125] Type signature of @property not shown in help()

2021-04-10 Thread Raymond Hettinger
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): '

[issue43739] Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type.

2021-04-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the PR -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43739] Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type.

2021-04-10 Thread Raymond Hettinger
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

[issue43739] Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type.

2021-04-10 Thread Raymond Hettinger
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

[issue43739] Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type.

2021-04-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +scoder ___ Python tracker <https://bugs.python.org/issue43739> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43739] Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type.

2021-04-10 Thread Raymond Hettinger
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

[issue43737] Documentation of modulo operator should document behaviour clearly when second operator is negative

2021-04-10 Thread Raymond Hettinger
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

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-04-10 Thread Raymond Hettinger
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

[issue43784] starting a thread in __del__ hangs at interpreter shutdown

2021-04-09 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43784> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43790] CLA check fails with a 500 error

2021-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Mariatta, do you know who to refer this to? -- nosy: +Mariatta, rhettinger ___ Python tracker <https://bugs.python.org/issue43

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-09 Thread Raymond Hettinger
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

[issue43737] Documentation of modulo operator should document behaviour clearly when second operator is negative

2021-04-09 Thread Raymond Hettinger
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

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-09 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: -rhettinger ___ Python tracker <https://bugs.python.org/issue43761> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43774] [Doc] Document configure options in the Python documentation

2021-04-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for adding this. -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43774> ___ ___ Python-bug

[issue43775] JSON Parsing Alarm: Requests + Json = JSONDecodeError

2021-04-08 Thread Raymond Hettinger
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

[issue43737] Documentation of modulo operator should document behaviour clearly when second operator is negative

2021-04-08 Thread Raymond Hettinger
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

[issue43340] json.load() can raise UnicodeDecodeError, but this is not documented

2021-04-07 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker <https://bugs.python.org/issue43340> ___ ___ Python-bugs-list mailing list Un

[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-07 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43766> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-07 Thread Raymond Hettinger
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

[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions

2021-04-07 Thread Raymond Hettinger
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

[issue43220] Argparse: Explicit default required arguments with add_mutually_exclusive_group are rejected

2021-04-07 Thread Raymond Hettinger
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

[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions

2021-04-06 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +pablogsal, tim.peters ___ Python tracker <https://bugs.python.org/issue43753> ___ ___ Python-bugs-list mailing list Unsub

[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions

2021-04-06 Thread Raymond Hettinger
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

[issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong)

2021-04-05 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong)

2021-04-05 Thread Raymond Hettinger
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

[issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong)

2021-04-05 Thread Raymond Hettinger
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

[issue43325] Documentation should warn that 'is' is not a safe comparison operator for most values.

2021-04-03 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43325] Documentation should warn that 'is' is not a safe comparison operator for most values.

2021-04-03 Thread Raymond Hettinger
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

[issue43325] Documentation should warn that 'is' is not a safe comparison operator for most values.

2021-04-03 Thread Raymond Hettinger
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

[issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong)

2021-04-03 Thread Raymond Hettinger
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

[issue43723] Deprecate camelCase aliases from threading.py

2021-04-03 Thread Raymond Hettinger
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: +

[issue43340] json.load() can raise UnicodeDecodeError, but this is not documented

2021-04-03 Thread Raymond Hettinger
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

[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2021-04-03 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker <https://bugs.python.org/issue43721> ___ ___ Python-bugs-list mailing list Un

[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2021-04-03 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43721> ___ ___ Python-

[issue43325] Documentation should warn that 'is' is not a safe comparison operator for most values.

2021-04-03 Thread Raymond Hettinger
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

[issue17306] Improve the way abstract base classes are shown in help()

2021-04-03 Thread Raymond Hettinger
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

[issue43713] sorted() signature is not accurate in the documentation

2021-04-03 Thread Raymond Hettinger
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

[issue43684] Add combined opcodes

2021-04-02 Thread Raymond Hettinger
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

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-04-02 Thread Raymond Hettinger
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

[issue43691] Comparison of OrderedDict() and dict()

2021-04-01 Thread Raymond Hettinger
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

[issue43677] Descriptor.rst - Reference to Py_MethodType is not up to date

2021-04-01 Thread Raymond Hettinger
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

[issue43677] Descriptor.rst - Reference to Py_MethodType is not up to date

2021-04-01 Thread Raymond Hettinger
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

[issue43677] Descriptor.rst - Reference to Py_MethodType is not up to date

2021-04-01 Thread Raymond Hettinger
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

[issue43677] Descriptor.rst - Reference to Py_MethodType is not up to date

2021-04-01 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker <https://bugs.python.org/issue43677> ___ ___ Python-bugs-list mai

[issue43691] Comparison of OrderedDict() and dict()

2021-04-01 Thread Raymond Hettinger
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

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-29 Thread Raymond Hettinger
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

[issue43639] Do not raise AttributeError on instance attribute update/deletion if data descriptor with missing __set__/__delete__ method found on its type

2021-03-27 Thread Raymond Hettinger
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

[issue43632] an error in the documentation of descriptor

2021-03-26 Thread Raymond Hettinger
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

[issue43632] an error in the documentation of descriptor

2021-03-26 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger priority: normal -> ___ Python tracker <https://bugs.python.org/issue43632> ___ ___

[issue40758] For 7.2.7. Code Examples, distinguish between the Tutorial and other documentation

2021-03-25 Thread Raymond Hettinger
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

[issue43628] Incorrect argument errors for random.getstate()

2021-03-25 Thread Raymond Hettinger
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

[issue39418] str.strip() should have a means of adding to the default behaviour

2021-03-25 Thread Raymond Hettinger
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

[issue43618] random.shuffle loses most of the elements

2021-03-25 Thread Raymond Hettinger
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

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-25 Thread Raymond Hettinger
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

[issue43625] CSV has_headers heuristic could be improved

2021-03-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43625> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43625] CSV has_headers heuristic could be improved

2021-03-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +skip.montanaro ___ Python tracker <https://bugs.python.org/issue43625> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-25 Thread Raymond Hettinger
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

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-25 Thread Raymond Hettinger
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

[issue43618] random.shuffle loses most of the elements

2021-03-25 Thread Raymond Hettinger
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

[issue43616] random.shuffle() crashes with Unhandled exception

2021-03-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +scoder -skrah ___ Python tracker <https://bugs.python.org/issue43616> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43618] random.shuffle loses most of the elements

2021-03-25 Thread Raymond Hettinger
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&#

[issue43198] One operation on sets < 1/100th as efficient in 3.9 than before

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43198] One operation on sets < 1/100th as efficient in 3.9 than before

2021-03-24 Thread Raymond Hettinger
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

[issue43618] random.shuffle loses most of the elements

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +skrah ___ Python tracker <https://bugs.python.org/issue43618> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43618] random.shuffle loses most of the elements

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43618> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43616] random.shuffle() crashes with Unhandled exception

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +skrah ___ Python tracker <https://bugs.python.org/issue43616> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43616] random.shuffle() crashes with Unhandled exception

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43616> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    4   5   6   7   8   9   10   11   12   13   >