[issue25488] IDLE: Remove '', user_dir, and idlelib from sys.path when added

2016-09-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5f788ad057ca by Terry Jan Reedy in branch '2.7': Issue #25488: Stpp idle.py from adding a entry when it is a duplicate. https://hg.python.org/cpython/rev/5f788ad057ca New changeset 013956a801e4 by Terry Jan Reedy in branch '3.5': Issue #25488: Stpp

[issue25488] IDLE: Remove '', user_dir, and idlelib from sys.path when added

2016-09-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: sys.path for 3.6.0b1 on Win 10. Start python from icon (start menu), console (py -3.6) or Explorer (click on python.exe) '', 'C:\\Programs\\Python36\\python36.zip', 'C:\\Programs\\Python36\\DLLs', 'C:\\Programs\\Python36\\lib', 'C:\\Programs\\Python36', 'C:\\Pro

[issue28316] descriptor and repr get into conflict

2016-09-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is no different than this simpler case: class A: def __init__(self, name): print("init {!r}".format(self)) self.name = name def __repr__(self): return "I am {}".format(self.name) The instance of A doesn't not have a name

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-09-29 Thread Martin Panter
Martin Panter added the comment: It might have been good to get this reopened to attract more attention to it. Anyway, Issue 28311 has now been opened for 2.7, and it seems to be about the same problem. -- nosy: +martin.panter superseder: -> AIX shared library extension modules instal

[issue28316] descriptor and repr get into conflict

2016-09-29 Thread Sabine Maennel
New submission from Sabine Maennel: I was working with descriptors and hit on an error, that I do not understand. I attach a protocol of my interactive python session that will show you what happened and the session is reproducible: I had a class employing a descriptor: class Descriptor(objec

[issue27942] Default value identity regression

2016-09-29 Thread Josh Rosenberg
Changes by Josh Rosenberg : -- nosy: +josh.r ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-09-29 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: use the logging module instead of sys.stderr -- keywords: +patch Added file: http://bugs.python.org/file44890/issue28294.patch ___ Python tracker _

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-09-29 Thread Xiang Zhang
Xiang Zhang added the comment: v2 now adds more tests and change the problematic variable name. -- Added file: http://bugs.python.org/file44889/PyUnicode_AsUCS4_v2.patch ___ Python tracker _

[issue28199] Compact dict resizing is doing too much work

2016-09-29 Thread INADA Naoki
INADA Naoki added the comment: As written in comment, reusing keys object breaks odict implementation. I think we can't avoid copy for Python 3.6. -- keywords: +patch Added file: http://bugs.python.org/file44888/dictresize.patch ___ Python tracker

[issue28226] compileall does not support pathlib

2016-09-29 Thread Berker Peksag
Changes by Berker Peksag : Added file: http://bugs.python.org/file44887/issue28226_v3.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28226] compileall does not support pathlib

2016-09-29 Thread Berker Peksag
Berker Peksag added the comment: > Is there a fix for compileall missing from the patch? No, os.path.* functions have taken care of the conversion, but the output was in the following format: Compiling PosixPath('/tmp/tmp_nfh98lw/_test.py')... I fixed it, added a test for the ddir argumen

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-09-29 Thread Nick Coghlan
Nick Coghlan added the comment: Due to the expected semantics of AttributeError being relatively precise, changing to a protocol check rather than just changing the order we look up the protocol attributes would also involving changing from AttributeError to TypeError. Since that's a potentia

[issue27854] Installed 2.7: IDLE Help disabled because help.html is missing

2016-09-29 Thread Ned Deily
Changes by Ned Deily : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___ Python

[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2016-09-29 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Updated the documentation to use instead of ? I also went through other examples in the page and fixed those too. -- keywords: +patch Added file: http://bugs.python.org/file44885/issue28315.patch ___ Python tracker

[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2016-09-29 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the report. I agree, it should be instead of ? I'll work on a patch for this :) -- ___ Python tracker ___

[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2016-09-29 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue28228] imghdr does not support pathlib

2016-09-29 Thread Berker Peksag
Berker Peksag added the comment: Here's a new patch that addresses Serhiy's comments. Let me know if you need a hand with review and commit these patches this weekend :) -- nosy: +berker.peksag Added file: http://bugs.python.org/file44884/issue28228_v2.diff ___

[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2016-09-29 Thread Viorel Tabara
New submission from Viorel Tabara: At https://docs.python.org/3.5/tutorial/errors.html#defining-clean-up-actions when I'm running the "divide('2', '1')" example I get: File "", line 1, in instead of the documentation output of: File "", line 1, in ? The same message is included with t

[issue23740] http.client request and send method have some datatype issues

2016-09-29 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue28313] ttk Style().configure() overwrites Tk().option_add() Button but not Label

2016-09-29 Thread qubodup
qubodup added the comment: Thank you for clarifying, reported at http://core.tcl.tk/tk/tktview/1dde2144bdcc5a93f8724fc1b1b85b19114e42c0 -- ___ Python tracker ___ ___

[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2016-09-29 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue28222] test_distutils fails

2016-09-29 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-29 Thread Oren Milman
Oren Milman added the comment: Ah, I should have read more about __int__ and __index__ before writing my last reply. So IIUC, this is a somewhat painful issue, which could be resolved by: * #20092 * replacing _PyLong_FromNbInt with PyNumber_Index in: - Objects/longobject.c (as yo

[issue28228] imghdr does not support pathlib

2016-09-29 Thread Brett Cannon
Brett Cannon added the comment: According to https://www.python.org/dev/peps/pep-0494/#schedule, 2.6.0b2 is due on Sunday. Do you think you will be able to commit this and the other patches for PathLike support by then, Ethan? -- ___ Python tracker

[issue28313] ttk Style().configure() overwrites Tk().option_add() Button but not Label

2016-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not Tkinter issue. Pure Tcl/Tk script shows the same result. If this is a bug (I don't know), this is Tk bug. -- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed Added file: http://bugs.python.org/

[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 17f2b6b2e24c by Victor Stinner in branch '3.5': Issue #28258: Explain the LC_ALL change in a comment https://hg.python.org/cpython/rev/17f2b6b2e24c New changeset f256bd5b8418 by Victor Stinner in branch '2.7': Issue #28258: Explain the LC_ALL change

[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a test. -- Added file: http://bugs.python.org/file44882/test_getiterator.patch ___ Python tracker ___

[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread STINNER Victor
STINNER Victor added the comment: I pushed the first obvious fix to unblock the 3.6 beta 2 release scheduled for next monday. -- priority: release blocker -> ___ Python tracker ___

[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1e29dca5dc4c by Victor Stinner in branch '3.6': Fix xml.etree.ElementTree.Element.getiterator() https://hg.python.org/cpython/rev/1e29dca5dc4c -- nosy: +python-dev ___ Python tracker

[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread STINNER Victor
Changes by STINNER Victor : -- priority: critical -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread STINNER Victor
STINNER Victor added the comment: Oh... Modules/_elementtree.c uses a function defined in Modules/clinic/_elementtree.c. It hardcodes flags, whereas flags changed. Maybe the alias should be created differently to avoid such issue in the future? Moreover, obviously, we lack unit tests on this g

[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread STINNER Victor
STINNER Victor added the comment: The bug seems related to the new FASTCALL calling convention introduced in Python 3.6b1. For an unknown reason, the METH_FASTCALL defined in Modules/clinic/_elementtree.c on _elementtree_Element_iter() seems to be ignored or lost somewhere? -- nosy: +

[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Oh. I expected at least "export LANG" somewhere. IMHO it deserves a comment > explaining the surprising ";". I don't know if export is needed. I see the same behavior with and without export. > Does it work if it's written on two lines? No, it doesn't wor

[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread Ned Deily
Ned Deily added the comment: Even better: Python 3.6.0b1 (v3.6.0b1:5b0ca4ed5e2f, Sep 12 2016, 09:24:46) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from xml.etree.ElementTree import Element >>> el = Element('foo

[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: > It looks to me that the patch contain unneeded changes. Some changes don't > affect performance, others don't look well justified. Are there benchmarks > that confirm the benefit of these changes? Hum, since I expect disag

[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread Dmitry Shachnev
New submission from Dmitry Shachnev: The documentation says that getiterator() still accepts a tag argument, but it does not: >>> from xml.etree.ElementTree import Element >>> el = Element('foo') >>> el.getiterator('bar') Traceback (most recent call last): File "", line 1, in SystemError: ..

[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread STINNER Victor
STINNER Victor added the comment: "Expansion is performed here by shell (spawned by make) itself before arguments are passed to find. So LC_ALL=C must be set as a separate command." Oh. I expected at least "export LANG" somewhere. IMHO it deserves a comment explaining the surprising ";". Does

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general the patch LGTM. I have small doubt about the name of one variable, and may be worth to add yet few tests. -- ___ Python tracker __

[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks to me that the patch contain unneeded changes. Some changes don't affect performance, others don't look well justified. Are there benchmarks that confirm the benefit of these changes? -- ___ Python tracke

[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is the question that I asked Arfrever. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread STINNER Victor
STINNER Victor added the comment: "LC_ALL=C; find" are you sure for ";"? -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2016-09-29 Thread Lawrence Velázquez
Changes by Lawrence Velázquez : -- nosy: +larryv ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: twouters -> serhiy.storchaka resolution: -> fixed stage: -> resolved status: open -> closed type: -> compile error versions: +Python 2.7 ___ Python tracker

[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6110997dd6e7 by Serhiy Storchaka in branch '3.5': Issue #28258: Fixed build with Estonian locale (python-config and distclean https://hg.python.org/cpython/rev/6110997dd6e7 New changeset 1b9e71f5de83 by Serhiy Storchaka in branch '3.6': Issue #28258

[issue28289] ImportError.__init__ doesn't reset not specified exception attributes

2016-09-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset dcb39d3ba67a by Serhiy Storchaka in branch 'default': Issue #28289: ImportError.__init__ now resets not specified attributes. https://hg.python.org/cpython/rev/dcb39d3ba67a -- nosy: +python-dev ___ Python

[issue28278] Make `weakref.WeakKeyDictionary.__repr__` meaningful

2016-09-29 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: I don't recall that the issues discussed here were considered when these classes were added; functionality was the issue at the time. I'm not particularly opposed to adding a more data-ful repr for the weakref-oriented mappings, but I'm not really convince

[issue28201] dict: perturb shift should be done when first conflict

2016-09-29 Thread INADA Naoki
INADA Naoki added the comment: Could anyone review the patch? I'm starting to #28199. But it must conflict with this patch. -- assignee: -> inada.naoki ___ Python tracker ___ _

[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-29 Thread Mark Dickinson
Mark Dickinson added the comment: > and got a 'TypeError: an integer is required (got type LikeInt)' Right, see #12974 for more on arrays, `__int__` and `__index__`. -- ___ Python tracker _

[issue28313] ttk Style().configure() overwrites Tk().option_add() Button but not Label

2016-09-29 Thread qubodup
New submission from qubodup: The following code will result in a small label and a big button: from tkinter import * from tkinter.ttk import * root = Tk() root.option_add("*Font", "sans-serif 12") s = Style() s.configure('TButton', font=('courier', 40)) s.configure('TLabel', font=('courier',

[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-09-29 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: I'm interested to work on a patch for this, if no one started yet. -- ___ Python tracker ___ ___ Py

[issue27942] Default value identity regression

2016-09-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-29 Thread Oren Milman
Oren Milman added the comment: You are right about the terminology of course. My bad. Anyway, the bug is not related to __index__ (or nb_index), because the three aforementioned functions are using (in case '!PyLong_Check(v)') PyArg_Parse with the formats 'l' or 'L'. Ultimately, convertsimple

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks for the correction Antti. Yes, this is what I initially meant. This optimization is applicable only if the left argument of % is a literal string and the right argument is a tuple expression. Saying about `'%s' % x` I meant a component of the tuple.

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Antti Haapala
Antti Haapala added the comment: Serhiy, you actually did make a mistake above; `'%s' % x` cannot be rewritten as `f'{x!s}'`, only `'%s' % (x,)` can be optimized... (just try with `x = 1, 2`) -- nosy: +ztane ___ Python tracker

[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please wait until I merge my changes. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: '%s' % x should be translated to f'{x!s}', not to f'{x:s}'. Only %s, %r and %a can be supported. Formatting with %i should left untranslated. Or maybe translate '%r: %i' % (a, x) to f'{a!r}: {"%i" % x}'. It is possible also to introduce special opcodes that

[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread STINNER Victor
STINNER Victor added the comment: dict_iter7.patch LGTM, go ahead. Just dont forget to mention Serhiy Storchaka as the co-author ;-) -- ___ Python tracker ___ __

[issue28310] Mixing yield and return with value is allowed

2016-09-29 Thread STINNER Victor
STINNER Victor added the comment: > The return value is ignored and an empty generator is produced. It's not ignored: it is passed in the argument of the StopIterator object. > You can read https://www.python.org/dev/peps/pep-0380 for the entire story. See also the PEP 479 (Change StopIteratio

[issue28277] ./Modules/_io/_iomodule.c build failure on AIX (beta1) while (a2) was fine.

2016-09-29 Thread Michael Felt
Michael Felt added the comment: yes. It is what I did manually. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue28310] Mixing yield and return with value is allowed

2016-09-29 Thread Xiang Zhang
Xiang Zhang added the comment: `return value` is allowed in a generator to support `yield from'. You can read https://www.python.org/dev/peps/pep-0380 for the entire story. -- nosy: +xiang.zhang resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue28312] Minor change - more direct hint re: multiple machine sizes and LONG_BIT conflicts

2016-09-29 Thread Michael Felt
New submission from Michael Felt: I have been trying to build (pip install) mercurial - for ages. I kept running into this message: "/opt/include/python2.7/pyport.h", line 887.2: 1506-205 (S) #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." And - finally, I

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Eric V. Smith
Eric V. Smith added the comment: There isn't a direct mapping between %-formatting and __format__ format specifiers. Off the top of my head, I can think of at least one difference: >>> '%i' % 3 '3' >>> '{:i}'.format(3) Traceback (most recent call last): File "", line 1, in ValueError: Unknow

[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44879/dict_iter7.patch ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue28308] Accelerate 'string'.format(value, ...) by using formatted string literals

2016-09-29 Thread Eric V. Smith
Eric V. Smith added the comment: One thing to be careful of here is that there's one slight difference between how str.format() and f-strings handle indexing of values. f-strings, of course, use normal Python semantics, but str.format() treats indexing by things that don't look like integers a

[issue28311] AIX shared library extension modules installation broken - Python2.7

2016-09-29 Thread Michael Felt
Changes by Michael Felt : -- type: compile error -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue28311] AIX shared library extension modules installation broken - Python2.7

2016-09-29 Thread Michael Felt
Changes by Michael Felt : -- type: -> compile error ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue28311] AIX shared library extension modules installation broken - Python2.7

2016-09-29 Thread Michael Felt
New submission from Michael Felt: issue#25825 is closed - and had python2.7 removed - so, want to mention there is something broken - a long time it would seem on AIX - for building packages after python and ensurepip are installed. Currently trying to pip install mercurial; later a regular "m

[issue28310] Mixing yield and return with value is allowed

2016-09-29 Thread Markus Unterwaditzer
New submission from Markus Unterwaditzer: The attached example code raises a SyntaxError in Python 2, but is syntactically valid in Python 3. The return value is ignored and an empty generator is produced. I see no reason for this behavioral change. -- components: Interpreter Core file

[issue28309] Accelerate string.Template by using formatted string literals

2016-09-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file44878/faster_template.patch ___ Python tracker ___ __

[issue28309] Accelerate string.Template by using formatted string literals

2016-09-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes string.Template compiling template to formatted string literal. Since for now using formatted string literals is the fastest way of formatting strings, this significantly speeds up Template substitution. $ ./python -m perf timeit -s 'f

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Build-out an AST optimizer, moving some functionality out of the peephole optimizer ___ Python tracker ___ __

[issue28308] Accelerate 'string'.format(value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Build-out an AST optimizer, moving some functionality out of the peephole optimizer ___ Python tracker ___ __

[issue28308] Accelerate 'string'.format(value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: For now using formatted string literals (PEP498) is the fastest way of formatting strings. $ ./python -m perf timeit -s 'k = "foo"; v = "bar"' -- '"{!s} = {!r}".format(k, v)' Median +- std dev: 3.96 us +- 0.17 us $ ./python -m perf timeit -s 'k = "foo"; v

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: For now using formatted string literals (PEP498) is the fastest way of formatting strings. $ ./python -m perf timeit -s 'k = "foo"; v = "bar"' -- '"%s = %r" % (k, v)' Median +- std dev: 2.27 us +- 0.20 us $ ./python -m perf timeit -s 'k = "foo"; v = "bar"'

[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread INADA Naoki
INADA Naoki added the comment: recreate patch with different option, since Rietveld doesn't accept dict_iter5.patch -- Added file: http://bugs.python.org/file44876/dict_iter6.patch ___ Python tracker _

[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-09-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: Using logging, instead of sys.stderr would be a welcome change in this module. -- keywords: +easy, needs review nosy: +orsenthil ___ Python tracker ___

[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-29 Thread Mark Dickinson
Mark Dickinson added the comment: One comment here: it's not the presence of `__int__` that makes a type integer-like; it's the presence of `__index__`. (Decimal and float both supply `__int__`, but shouldn't be regarded as integer-like, for example.) I'm guessing that we're going to have the

[issue24274] erroneous comments in dictobject.c

2016-09-29 Thread INADA Naoki
Changes by INADA Naoki : -- keywords: +patch Added file: http://bugs.python.org/file44875/lookdict_unicode_comment.patch ___ Python tracker ___ __