[issue13691] pydoc help (or help('help')) should show the doc for help

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: After reviewing Sanyam's PR at https://github.com/python/cpython/pull/172 I ended up rejecting it as an approach to resolving this issue. The core problem with the approach is that accessing `_sitebuiltins._Helper` is an implementation detail twice over: -

[issue22702] to improve documentation for join() (str method)

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: Noting for the record: Marco Buttu proposed my suggested approach on the PR back in early March. -- ___ Python tracker

[issue29798] Handle "git worktree" in "make patchcheck"

2017-04-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +1204 ___ Python tracker ___ ___

[issue29798] Handle "git worktree" in "make patchcheck"

2017-04-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +1205 ___ Python tracker ___ ___

[issue29798] Handle "git worktree" in "make patchcheck"

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: Oops, the new PRs and merges haven't shown up automatically because I didn't fix the spelling of the issue number. 3.7 (master): https://github.com/python/cpython/pull/1058 3.6: https://github.com/python/cpython/pull/1060 3.5:

[issue29798] Handle "git worktree" in "make patchcheck"

2017-04-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +1206 ___ Python tracker ___ ___

[issue29798] Handle "git worktree" in "make patchcheck"

2017-04-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +1207 ___ Python tracker ___ ___

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-09 Thread Victor Varvariuc
New submission from Victor Varvariuc: https://mail.python.org/pipermail/python-ideas/2017-April/045405.html Hi there. I asked a question on Stackoverflow: > (Pdb) import brain.utils.mail > (Pdb) import brain.utils.mail as

[issue30023] Example code becomes invalid for "Why do lambdas defined in a loop with different values all return the same result?"

2017-04-09 Thread Eric V. Smith
Eric V. Smith added the comment: That's consistent with the example: it's showing you how to create a list of functions, that when called, return squares. "This gives you a list that contains 5 lambdas that calculate x**2" Maybe "squares" isn't the most awesome name, but I think if you read

[issue29506] Incorrect documentation for the copy module

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 19e04942562a980ad2519f6ff79c455a7472783b by Nick Coghlan (Sanyam Khurana) in branch 'master': bpo-29506: Clarify deep copy note in copy module https://github.com/python/cpython/commit/19e04942562a980ad2519f6ff79c455a7472783b --

[issue29506] Incorrect documentation for the copy module

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset bd18351c31573ab9a8580677004370a774a4eaae by Nick Coghlan in branch '3.5': bpo-29506: Clarify deep copy note in copy module https://github.com/python/cpython/commit/bd18351c31573ab9a8580677004370a774a4eaae --

[issue29506] Incorrect documentation for the copy module

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset a524d6307273e3920d410452ace89610c843f051 by Nick Coghlan in branch '3.6': bpo-29506: Clarify deep copy note in copy module https://github.com/python/cpython/commit/a524d6307273e3920d410452ace89610c843f051 --

[issue29506] Incorrect documentation for the copy module

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset ab16dc180e362e4cdb9eb163fae0a75664dcea3e by Nick Coghlan in branch '2.7': bpo-29506: Clarify deep copy note in copy module https://github.com/python/cpython/commit/ab16dc180e362e4cdb9eb163fae0a75664dcea3e --

[issue29506] Incorrect documentation for the copy module

2017-04-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed type: -> enhancement ___ Python tracker

[issue30025] useful information

2017-04-09 Thread Zachary Ware
Changes by Zachary Ware : -- Removed message: http://bugs.python.org/msg291378 ___ Python tracker ___

[issue30025] Spam

2017-04-09 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: -drkirkby resolution: -> not a bug stage: -> resolved status: open -> closed title: useful information -> Spam ___ Python tracker

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-09 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Mark Dickinson
Mark Dickinson added the comment: > Is math.exp(x) always more accurate than math.e ** x? As Serhiy says: not always, and in general the answer is going to depend on the relative quality of the libm implementations of pow and exp. But on typical machines, it is going to be true that

[issue30026] Hashable doesn't check for __eq__

2017-04-09 Thread Max
New submission from Max: I think collections.abc.Hashable.__subclasshook__ should check __eq__ method in addition to __hash__ method. This helps detect classes that are unhashable due to: to __eq__ = None Of course, it still cannot detect: def __eq__: return NotImplemented but it's better

[issue13691] pydoc help (or help('help')) should show the doc for help

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: Aye, it's definitely a tricky problem. While I didn't take them into account in my review, I now realise those issues also impacted the attempted workaround - I'd be surprised if it worked as intended in those other contexts (even the "pydoc -b" rendered HTML

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-09 Thread irdb
Changes by irdb : -- nosy: +irdb ___ Python tracker ___ ___ Python-bugs-list mailing

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2017-04-09 Thread Berker Peksag
Berker Peksag added the comment: New changeset 0e6cb2ea624570ed08c354f1ed1f595dab4192d6 by Berker Peksag (Aviv Palivoda) in branch 'master': bpo-26187: Test that set_trace_callback() is not called multiple times (GH-461)

[issue26187] sqlite3 trace callback prints duplicate line

2017-04-09 Thread Berker Peksag
Berker Peksag added the comment: New changeset 0e6cb2ea624570ed08c354f1ed1f595dab4192d6 by Berker Peksag (Aviv Palivoda) in branch 'master': bpo-26187: Test that set_trace_callback() is not called multiple times (GH-461)

[issue29798] Handle "git worktree" in "make patchcheck"

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 4c116cb3b3ee38cae229f7e0df0cd2045fe73c27 by Nick Coghlan in branch '3.6': bpo-29798: Handle git worktree in patchcheck (#1058) (#1060) https://github.com/python/cpython/commit/4c116cb3b3ee38cae229f7e0df0cd2045fe73c27 --

[issue29798] Handle "git worktree" in "make patchcheck"

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset c82d39479a88154bd72a3a304be5f473c118da95 by Nick Coghlan in branch '3.5': bpo-29798: Handle git worktree in patchcheck https://github.com/python/cpython/commit/c82d39479a88154bd72a3a304be5f473c118da95 --

[issue22702] to improve documentation for join() (str method)

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: Raymond, in the review comments on https://github.com/python/cpython/pull/156 Xiang noted that the current apparently duplicated iterable isn't entirely redundant: - the first reference is to the term "iterable" - the second reference is to the parameter name

[issue29506] Incorrect documentation for the copy module

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: I'm going to merge Sanyam's PR as-is, as while David's reformulation shorten the overall sentence, it complicates the core description of the problem (copying things that you didn't want copied) by merging it with the stereotypical example of why you might not

[issue29506] Incorrect documentation for the copy module

2017-04-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +1209 ___ Python tracker ___ ___

[issue29506] Incorrect documentation for the copy module

2017-04-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +1208 ___ Python tracker ___ ___

[issue29506] Incorrect documentation for the copy module

2017-04-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +1210 ___ Python tracker ___ ___

[issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError

2017-04-09 Thread svelankar
Changes by svelankar : -- nosy: +svelankar ___ Python tracker ___ ___

[issue13691] pydoc help (or help('help')) should show the doc for help

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > It does make me wonder whether it might be worth defining a __help__ magic > method that completely overrides what help(obj) displays. This should be very complex protocol if take to account that help() outputs formatted and highlighted text and pydoc can

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: The background here is the change in http://bugs.python.org/issue17636 that allows IMPORT_FROM to fall back to sys.modules when written as "from a.b import c as m", while the plain LOAD_ATTR generated for "import a.b.c as m" fails. One potential resolution to

[issue30023] Example code becomes invalid for "Why do lambdas defined in a loop with different values all return the same result?"

2017-04-09 Thread Eric V. Smith
Changes by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-09 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, the stackoverflow point to another stackoverflow (http://stackoverflow.com/questions/24807434/imports-in-init-py-and-import-as-statement/24968941#24968941) which is due to an import cycle. Is there also an import cycle here? Because I cannot seem repro

[issue30026] Hashable doesn't check for __eq__

2017-04-09 Thread Max
Max added the comment: Sorry, this should be just a documentation issue. I just realized that __eq__ = None isn't correct anyway, so instead we should just document that Hashable cannot check for __eq__ and that explicitly deriving from Hashable suppresses hashability. -- components:

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-09 Thread Victor Varvariuc
Victor Varvariuc added the comment: # mytest/mod2.py: import sys import mytest.mod1 assert 'mytest.mod1' in sys.modules import mytest.mod1 as mod # this fails, though the prev. lines work perfectly -- Added file: http://bugs.python.org/file46794/test.zip

[issue26187] sqlite3 trace callback prints duplicate line

2017-04-09 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Anish and Aviv! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29798] Handle "git worktree" in "make patchcheck"

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: OK, this should really be working now (and I checked it on my 2.7 checkout before submitting that PR). Any further problems found should go in a new issue. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed

[issue29506] Incorrect documentation for the copy module

2017-04-09 Thread Nick Coghlan
Nick Coghlan added the comment: Assigning to myself since Sanyam submitted the related PR at the PyCon Pune sprints. -- assignee: docs@python -> ncoghlan ___ Python tracker

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is the original issue, it isn't invented by me. ``math.e`` is the nearest representable value to the mathematical constant *e* and ``math.exp(x)`` is the nearest representable value to the mathematical constant *e* raised to the power *x*, but not the

[issue30027] test_xml_etree and test_xml_etree_c fail due to AssertionError: unhandled warning DeprecationWarning

2017-04-09 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis: test_xml_etree.py and test_xml_etree_c.py on 2.7 branch fail since this commit: commit 68903b656d4e1011525a46cbd1338c6cbab83d6d Author: Serhiy Storchaka Date: Sun Apr 2 16:55:43 2017 +0300 bpo-15083: Convert

[issue30008] OpenSSL 1.1.0 deprecated functions

2017-04-09 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___

[issue30027] test_xml_etree and test_xml_etree_c fail due to AssertionError: unhandled warning DeprecationWarning

2017-04-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1211 ___ Python tracker ___ ___

[issue14039] Add "metavar" argument to add_subparsers() in argparse

2017-04-09 Thread Martin Panter
Martin Panter added the comment: Thanks to Issue 11807, the documentation now lists “metavar”. (However, it looks like a positional argument, rather than keyword-only, and its use seems to be discouraged, but those issues are not specific to “metavar”.) Some points specific to “metavar” that

[issue29030] argparse: choices override metavar

2017-04-09 Thread Martin Panter
Martin Panter added the comment: I think the documentation should be fixed to say choices overrides dest, and the implementation should be left alone. Even if the documentation is not a “formal module reference”, it should not be wrong or misleading. Also, Issue 14039 is related, about

[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-04-09 Thread Nathaniel Smith
Nathaniel Smith added the comment: > Can we consider 3.6.0 rather than 3.6.1 as broken release? In the last week, pypi downloads were about evenly split between 3.6.0 and 3.6.1 (2269969 for "3.6.1", 1927189 for "3.6.0", and those two were ~2 orders of magnitude more common than other strings

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-09 Thread Martin Panter
Martin Panter added the comment: The current exception seems to give a reasonable hint: >>> subprocess.Popen((executable,), stdout=BytesIO()) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/subprocess.py", line 914, in __init__ errread, errwrite) =

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-09 Thread Raphael Gaschignard
Raphael Gaschignard added the comment: that error is what is raised by StringIO (subclassing OSError), other file-like objects could just be raising OSError (according to the file object spec described in the documentation for the io module). Fixing documentation would already be helpful

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-09 Thread Victor Varvariuc
Victor Varvariuc added the comment: > I'm inclined not to attempt to fix this. The reason that we don't pull 'a.b' > out of sys.modules at this point is that if later in the execution of a/b.py > we get an exception, the import will be cancelled, and sys.modules['a.b'] > will be *deleted*,

[issue30028] make test.support.temp_cwd() fork-safe

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is os.getpid always available? I have found hasattr(os, 'getpid') in the logging module. -- nosy: +haypo, serhiy.storchaka, vinay.sajip stage: -> patch review ___ Python tracker

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch applies Mark's fix to math.expm1() and cmath.exp(), adds the accuracy note to math.exp(), adds italic to mathematical constants, fixes empty lines. -- ___ Python tracker

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1216 ___ Python tracker ___ ___

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-09 Thread Victor Varvariuc
Victor Varvariuc added the comment: > it is possible for module a to override its attribute b without updating > sys.modules This sounds like a really strange application. Even if someone overrides the attribute, when you do in other place `import a.b.c as m` you expect `a.b.c` to be path to

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, these kind of nuances really aren't beginner topics. -- ___ Python tracker ___

[issue30029] Compiler "'await' outside function" error message is unreachable

2017-04-09 Thread anthony shaw
New submission from anthony shaw: This is related to issue26188, Using await in a simple statement (outside of an async def method) raises SyntaxError with the unhelpful message "invalid syntax". It seems obvious once you've read PEP492 in detail, but I think that as more and more developers

[issue30027] test_xml_etree and test_xml_etree_c fail due to AssertionError: unhandled warning DeprecationWarning

2017-04-09 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: To reproduce problem when running only these 2 files, use e.g.: python2.7 -3 -m test.test_xml_etree python2.7 -3 -m test.test_xml_etree_c For full test suite, this -3 option is set in Makefile: TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON)

[issue30027] test_xml_etree and test_xml_etree_c fail due to AssertionError: unhandled warning DeprecationWarning

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, I ran tests with -Wa and -We, but forgot to run with -3. Thank you for noticing this Arfrever! -- ___ Python tracker

[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2017-04-09 Thread Adam Meily
Changes by Adam Meily : -- pull_requests: +1213 ___ Python tracker ___ ___

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: To include corner cases, I should have asked 'at least as accurate' rather than 'more accurate'. It would be a sad libm that had specialized functions worse than pow, since the specialized functions could, at worse, use pow. For an expert point of view, the

[issue30028] make test.support.temp_cwd() fork-safe

2017-04-09 Thread Anselm Kruis
New submission from Anselm Kruis: The context manager test.support.temp_cwd() creates a temporary directory and removes it on exit. The test runner test.regrtest uses this context manager. I observed an annoying behaviour of test.support.temp_cwd() on Linux/UNIX: if the code, that runs in the

[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-09 Thread Christoph Böddeker
Christoph Böddeker added the comment: I had a problem that can be solved with the presented change. But I had also problems to reproduce it in a small example. I am not sure if a test is allowed to depend on external libraries. The code at the end executed with mpirun -np 3 python test.py

[issue30026] Hashable doesn't check for __eq__

2017-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: > # Can't instantiate abstract class X with abstract methods Sorry, this is how ABCs are supposed to work. They use @abstractmethod to specify requirements that a subclass if required to implement. The ABC metaclass then enforces that requirement,

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-09 Thread Guido van Rossum
Guido van Rossum added the comment: So to save others the bother to check what's in the zip file, the contents of mytest/mod1.py is as follows: import mytest.mod2 as mod def func(): print('mod1.func called') mod.func() There's no __init__.py (so mytest is a namespace package, PEP

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: > The only issue is how to distinguish ``math`` constant ``e`` > from mathematical constant *e*. Sorry, I think you're inventing an issue here. ``math.e`` is the nearest representable value to the mathematical constant *e*. This is no more interesting or

[issue26860] Make os.walk and os.fwalk yield namedtuple instead of tuple

2017-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: There doesn't seem to be a consensus that the proposal is a net win. Serhiy made a persuasive argument that the added complexity isn't worth it. I'll leave this open for a day or two so that anyone else can make their case. Otherwise, I'll mark this as

[issue26860] Make os.walk and os.fwalk yield namedtuple instead of tuple

2017-04-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg291388 ___ Python tracker ___

[issue30029] Compiler "'await' outside function" error message is unreachable

2017-04-09 Thread anthony shaw
Changes by anthony shaw : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-09 Thread Raphael Gaschignard
Raphael Gaschignard added the comment: I'm sorry for the confusion here, it turns out I was misinterpreting the results of my program and my workaround was not working. Like others have said, the subprocess code seems to rely on the existence of file descriptors I would be pretty partial to

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Is math.exp(x) always more accurate than math.e ** x? It is usually at least as accurate, but we can't really guarantee anything because math.exp does whatever the underlying C math library does (so good libary -> good result, bad library -> bad

[issue29549] Improve docstring for str.index

2017-04-09 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 577fc04a7157f6e904cffd6a0e1ad83d3460acd6 by Mariatta in branch '3.6': [3.6] bpo-29549: Fixes docstring for str.index (GH-256) (GH-1028) https://github.com/python/cpython/commit/577fc04a7157f6e904cffd6a0e1ad83d3460acd6 --

[issue19225] lack of PyExc_BufferError doc

2017-04-09 Thread KINEBUCHI Tomohiko
Changes by KINEBUCHI Tomohiko : -- pull_requests: +1214 ___ Python tracker ___ ___

[issue30029] Compiler "'await' outside function" error message is unreachable

2017-04-09 Thread anthony shaw
Changes by anthony shaw : -- pull_requests: +1215 ___ Python tracker ___ ___

[issue26860] Make os.walk and os.fwalk yield namedtuple instead of tuple

2017-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: There doesn't seem to be a consensus that the proposal is a net win. Serhiy make a persuasive argument that the added complexity isn't worth it. I'll leave this open for a day or two for anyone else to make their case. I'll make this add closed.

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond added his comment while I was writing mine. A FAQ with added caveats might be even better, but it will be mostly missed. If we add one, I might add a comment to some of the SO questions. -- ___ Python

[issue30028] make test.support.temp_cwd() fork-safe

2017-04-09 Thread Anselm Kruis
Changes by Anselm Kruis : -- pull_requests: +1212 ___ Python tracker ___ ___

[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-04-09 Thread Nathaniel Smith
Nathaniel Smith added the comment: It looks like PyTorch got bitten by this: https://discuss.pytorch.org/t/pyslice-adjustindices-error/1475/11 -- ___ Python tracker

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nuances of expm1(), log1p(), log2() and log10() aren't beginner topics, but they are documented. I think it wouldn't harm if add "This is usually more accurate than ``e ** x`` or ``pow(e, x)``." The only issue is how to distinguish ``math`` constant ``e``

[issue30029] Compiler "'await' outside function" error message is unreachable

2017-04-09 Thread anthony shaw
anthony shaw added the comment: yey! I figured it out!! -- ___ Python tracker ___ ___ Python-bugs-list

[issue26860] Make os.walk and os.fwalk yield namedtuple instead of tuple

2017-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would expect that the field access time is inconsequential compared to just about every other aspect of os.walk(). -- ___ Python tracker

[issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing

2017-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm going to decline this suggestion. Antoine is right that this is a can of worms best less closed. Likewise, Richard pointed out that there is potential to break existing code. FWIW, the existence of super() does not imply that all existing classes

[issue30023] Example code becomes invalid for "Why do lambdas defined in a loop with different values all return the same result?"

2017-04-09 Thread Philip Lee
New submission from Philip Lee: There example code here becomes invalid https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result >>> squares = [] >>> for x in range(5): squares.append(lambda: x**2) >>>

[issue26860] Make os.walk and os.fwalk yield namedtuple instead of tuple

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: s/at least/at most/ -- ___ Python tracker ___ ___ Python-bugs-list

[issue26860] Make os.walk and os.fwalk yield namedtuple instead of tuple

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: namedtuple's attribute access was optimized in recent years. In 3.7 it is 30% faster than in 3.4. So now it is only 3x times slower compared to a plain tuple. On other hand, os.walk() and os.fwalk() was optimized too. In 3.7 they are up to 3.5x times faster

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 64c8f705c0121a4b45ca2c3bc7b47b282e9efcd8 by Serhiy Storchaka (Michael Seifert) in branch 'master': bpo-29951: Include function name for some error messages in `PyArg_ParseTuple*` (#916)

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Michael. Since most builtin and extension functions and methods now use Argument Clinic and provide a function name, this should be a great enhancement. -- resolution: -> fixed stage: patch review -> resolved status: