[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread Ethan Furman
Ethan Furman added the comment: INADA Naoki said: > But while new instance is not created each time, 4 Python method > calls (e,g. IntFlag.__and__() -> IntFlag.__new__() > -> IntFlag._missing_() -> IntFlag._create_pseudo_member_()) > are much slower than int & int. Only

[issue31698] Add REQ_NAME to the node.h API

2017-10-04 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : See https://github.com/python/cpython/pull/1669#pullrequestreview-67229284 -- assignee: Jelle Zijlstra components: Interpreter Core messages: 303739 nosy: Jelle Zijlstra, yselivanov priority: low severity: normal status:

[issue31689] random.choices does not work with negative weights

2017-10-04 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue31689] random.choices does not work with negative weights

2017-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm content with the current exception. -- assignee: -> rhettinger ___ Python tracker

[issue31693] Document Py_GETENV

2017-10-04 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch pull_requests: +3864 stage: -> patch review ___ Python tracker ___

[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread STINNER Victor
STINNER Victor added the comment: The perf module always starts with a "warmup" run to fill caches. If enum has a cache, it should be filled automatically. -- ___ Python tracker

[issue31634] Consider installing wheel in ensurepip by default

2017-10-04 Thread Donald Stufft
Donald Stufft added the comment: > * the current install time bundling of setuptools in `ensurepip` is likely to > be replaced by `pip` dynamically installing both `setuptools` & `wheel` when > asked to build from a source archive when no other build system has been >

[issue31634] Consider installing wheel in ensurepip by default

2017-10-04 Thread Nick Coghlan
Nick Coghlan added the comment: As a shorter version of the above: * the current install time bundling of setuptools in `ensurepip` is likely to be replaced by `pip` dynamically installing both `setuptools` & `wheel` when asked to build from a source archive when no other

[issue31634] Consider installing wheel in ensurepip by default

2017-10-04 Thread Nick Coghlan
Nick Coghlan added the comment: Of the listed benefits, I think the most interesting one is the fact it would enable pip's wheel cache by default for all installations, rather than relying on projects publishing pre-built wheel files to PyPI. However, actually doing this

[issue31697] Regression in futures.as_completed with ProcessPoolExecutor.

2017-10-04 Thread coady
New submission from coady : `futures.as_completed` is not generating process-based futures in completed order. Reproduces with 3.7a0. -- files: test.py messages: 303733 nosy: coady priority: normal severity: normal status: open title: Regression in

[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread INADA Naoki
INADA Naoki added the comment: > IntFlag.__and__ does not create a new instance every time -- all new > instances are cached in the IntFlag machinery (so RegexFlag(7) is only > created once). I'm sorry, I misunderstood. But while new instance is not created each time,

[issue30767] logging must check exc_info correctly

2017-10-04 Thread Matthew Patton
Change by Matthew Patton : -- keywords: +patch pull_requests: +3863 stage: -> patch review ___ Python tracker ___

[issue31696] don't mention GCC in sys.version when built with Clang

2017-10-04 Thread Benjamin Peterson
New submission from Benjamin Peterson : When built with clang, Python reports that it was built with something like "GCC 4.2.1 Compatible Clang 4.0.0 (tags/RELEASE_400/rc1)". This is because clang pretends to be GCC 4.2.1 for the purposes of the __VERSION__ preprocessor

[issue30872] Update curses docs to Python 3

2017-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +3862 ___ Python tracker ___

[issue30872] Update curses docs to Python 3

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 300dd552b15825abfe0e367ac14cec4c3e050dbc by Serhiy Storchaka in branch 'master': bpo-30872: Update the curses docs to Python 3. (#2620)

[issue31695] Improve bigmem tests

2017-10-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : I think that the process of running bigmem tests should be improved. 1. Every bigmem test should run in separate process. It's effect on memory fragmentation shouldn't affect other tests. 2. Only one bigmem test should be run

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Stefan Krah
Stefan Krah added the comment: > I'm also assuming that Decimal(0) sets both base and exponent to 0. No, 0 is really special in the IBM specification. The magnitude is kept, the precision is not. >>> Decimal("0e10") * Decimal("0e20") Decimal('0E+30') >>>

[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31694] Running Windows installer with LauncherOnly=1 should not register the version as installed

2017-10-04 Thread Zachary Ware
Change by Zachary Ware : -- assignee: -> steve.dower components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker

[issue31694] Running Windows installer with LauncherOnly=1 should not register the version as installed

2017-10-04 Thread Tzu-ping Chung
New submission from Tzu-ping Chung : After running python-3.6.2-amd64.exe /quiet LauncherOnly=1 Python 3.6.2 is registered as installed, even though nothing is actually installed. Running the installer again at this point shows an error indicating “this product is

[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 328b5d0e64798cf17360c6b2a07c2b18f2798b88 by Serhiy Storchaka in branch '2.7': [2.7] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) (#3876)

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Aaron Meurer
Aaron Meurer added the comment: I meant that format() destroys information in a decimal in general. Obviously if you have n digits of precision and format with m < n, then you lose information. I also can't help but feel that we're mixing up "trailing zeros" (i.e.,

[issue31657] unit test for optimization levels does not cover __debug__ case

2017-10-04 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for this enhancement, Diana. Since PR has been merged, and backport is not needed, I think this can be closed now. :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Stefan Krah
Stefan Krah added the comment: I don't think format() destroys the information: >>> '{:+.19e}'.format(Decimal("0.0e20")) '+0.000e+34' The original magnitude was e+15, after formatting it's still e+15. --

[issue31667] Wrong links in the gettext.NullTranslations class

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ed77fbffa5bf81c8d16700370fe8bb63bbae1428 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31667: Fix gettext related links. (GH-3860) (#3886)

[issue31688] scope error

2017-10-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Abdullah, in the future, please upload or post runnable Python code, not an image. Output can be copied into a message. If you think IDLE is doing something wrong, test by running the code directly with Python. If your file is test.py,

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Aaron Meurer
Aaron Meurer added the comment: I guess I would expect that to be captured by the number of zeros printed (and obviously doing a string format operation with a set number of digits destroys that information). -- ___ Python

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Stefan Krah
Stefan Krah added the comment: Yes, from the point of view of decimal it's the right thing: >>> x = Decimal("1e25").quantize(Decimal("1e30")) >>> x Decimal('0E+30') >>> '{:+.19e}'.format(x) '+0.000e+49' >>> The original magnitude should be traceable (the

[issue31667] Wrong links in the gettext.NullTranslations class

2017-10-04 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +3861 ___ Python tracker ___

[issue31667] Wrong links in the gettext.NullTranslations class

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c02a1f4ad8fcdbffad2911c5a31c71a17a89d713 by Serhiy Storchaka in branch 'master': bpo-31667: Fix gettext related links. (#3860) https://github.com/python/cpython/commit/c02a1f4ad8fcdbffad2911c5a31c71a17a89d713

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 77732be801c18013cfbc86e27fcc50194ca22c8e by Serhiy Storchaka in branch 'master': bpo-30404: The -u option now makes the stdout and stderr streams totally unbuffered. (#1667)

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there is a need in making redirected stdout line-buffered, a new option can be added in separate issue. -- ___ Python tracker

[issue31557] tarfile: incorrectly treats regular file as directory

2017-10-04 Thread Joe Tsai
Joe Tsai added the comment: It creates a number of nested directories only because GNU (and BSD) tar implicitly create missing parent directories. If you cd into the bottom-most folder, you will see "foo.txt". -- ___ Python

[issue30397] Expose regular expression and match objects types in the re module

2017-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30397] Expose regular expression and match objects types in the re module

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0b5e61ddca73ad4fe597fb15065115b0285c8849 by Serhiy Storchaka in branch 'master': bpo-30397: Add re.Pattern and re.Match. (#1646) https://github.com/python/cpython/commit/0b5e61ddca73ad4fe597fb15065115b0285c8849

[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-04 Thread Brett Cannon
Brett Cannon added the comment: The whole imp module is deprecated so I'm personally not bothered by imp.load_source() not being strengthened to be more sane. -- ___ Python tracker

[issue31690] Make RE "a", "L" and "u" inline flags local

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 3885 is a preliminary but working implementation. Needed new tests and documentation. >>> import re >>> re.findall('(?i:[a-z]+)', ''.join(map(chr, range(0x1 ['ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz',

[issue31683] a stack overflow on windows in faulthandler._fatal_error()

2017-10-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8d5a3aad2f805dc0ea40829b751f58aa6c75305d by Victor Stinner in branch 'master': bpo-31683: Py_FatalError() now supports long error messages (#3878)

[issue31688] scope error

2017-10-04 Thread R. David Murray
R. David Murray added the comment: Yes, this conforms to Python's namespace/scoping rules: nested scopes are allowed to reference (but not assign to) variables from the global scope even without a 'global' declaration. -- nosy: +r.david.murray resolution: ->

[issue31690] Make RE "a", "L" and "u" inline flags local

2017-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +3860 ___ Python tracker ___ ___

[issue31623] Allow to build MSI installer from the official tarball

2017-10-04 Thread Zachary Ware
Zachary Ware added the comment: If you're still on XP, security is obviously not a big concern and you're just as well off to stick with 3.4.4 :) -- ___ Python tracker

[issue31623] Allow to build MSI installer from the official tarball

2017-10-04 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: > Note, though, that you are likely to be the only person on Earth using this installer, since there will be no more binary releases of 3.4 Since this is the last release for XP, probably the ppl who are stuck on this OS as well. An

[issue31693] Document Py_GETENV

2017-10-04 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : I already added a section to the C API docs for some useful macros. I didn't know about this one when I did that, but it seems like a useful macro to document, so I will do that. -- assignee: barry components: Documentation

[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread Ethan Furman
Ethan Furman added the comment: IntFlag.__and__ does not create a new instance every time -- all new instances are cached in the IntFlag machinery (so RegexFlag(7) is only created once). If all the RegexFlag combinations are created before the regex compile benchmark do

[issue31692] Test `test_huntrleaks` fails in debug build with COUNT_ALLOCS

2017-10-04 Thread Iryna Shcherbina
New submission from Iryna Shcherbina : The newly added `test_huntrleaks` test is failing on Python 2.7.14 debug build with COUNT_ALLOCS. == FAIL: test_huntrleaks (test.test_regrtest.ArgsTestCase)

[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2017-10-04 Thread STINNER Victor
STINNER Victor added the comment: > It would also be nice if Cython could use it automatically. Cython is using FASTCALL since Python 3.6. -- ___ Python tracker

[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2017-10-04 Thread STINNER Victor
STINNER Victor added the comment: I suggest to document the following 4 functions/macros: PyAPI_FUNC(PyObject *) _PyObject_FastCallDict( PyObject *callable, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); PyAPI_FUNC(PyObject *)

[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2017-10-04 Thread STINNER Victor
STINNER Victor added the comment: > Can we please document these for Python 3.7 at least? I chose to not document FASTCALL on purpose in Python 3.6, I wanted to keep everything private, until we get enough feedback and stabilize the API. Recently, the FASTCALL API

[issue31691] Include missing info on required build steps and how to build installer

2017-10-04 Thread Ivan Pozdeev
Change by Ivan Pozdeev : Added file: https://bugs.python.org/file47192/0001-Add-missing-build-steps-in-build-procedure.patch ___ Python tracker

[issue28805] Add documentation for METH_FASTCALL

2017-10-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: This and the _PyObject_FastCall* APIs really do need to be documented, especially if they're going to be used in the interpreter itself. The leading underscore signifies that it's not part of the public API (well, METH_FASTCALL doesn't

[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2017-10-04 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- title: Add documentation for METH_FASTCALL -> Add documentation for METH_FASTCALL and _PyObject_FastCall*() ___ Python tracker

[issue31691] Include missing info on required build steps and how to build installer

2017-10-04 Thread Ivan Pozdeev
New submission from Ivan Pozdeev : Current build instructions no not mention required preliminary steps before building the solution and don't say how to build the installer package - which is the ultimate goal of a build. Being on XP at the moment, I cannot check the

[issue17446] doctest test finder doesnt find line numbers of properties

2017-10-04 Thread Michael Cuthbert
Michael Cuthbert added the comment: A pull request has been in for about a month -- is it possible to review or merge or comment? Thanks! -- ___ Python tracker

[issue31689] random.choices does not work with negative weights

2017-10-04 Thread Allen Riddell
Allen Riddell added the comment: Upon some reflection, I think raising a ValueError is the right thing to do. Negative weights don't have an obvious interpretation. -- ___ Python tracker

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___

[issue31690] Make RE "a", "L" and "u" inline flags local

2017-10-04 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +3858 stage: needs patch -> patch review ___ Python tracker ___

[issue31672] string.Template should use re.ASCII flag

2017-10-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Oct 4, 2017, at 10:05, Serhiy Storchaka wrote: > > See issue31690. But this solution can be used only in 3.7. That’s fine. I don’t think this is important enough to backport. --

[issue31677] email.header uses re.IGNORECASE without re.ASCII

2017-10-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Oct 3, 2017, at 23:51, INADA Naoki wrote: >> It's better to keep the re.IGNORECASE since the RFC also says: >> >> Both 'encoding' and 'charset' names are case-independent. Thus the >> charset name "ISO-8859-1"

[issue31690] Make RE "a", "L" and "u" inline flags local

2017-10-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently re supports local inline flags. 'a(?i:b)' matches 'a' cases-sensitively, but 'b' case-insensitively. But flags 'a' and 'L' can't be scoped to a subpattern. The 'u' flag currently just redundant, it doesn't make

[issue31672] string.Template should use re.ASCII flag

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue31690. But this solution can be used only in 3.7. -- ___ Python tracker ___

[issue31690] Make RE "a", "L" and "u" inline flags local

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

[issue31672] string.Template should use re.ASCII flag

2017-10-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Oct 4, 2017, at 02:29, INADA Naoki wrote: > > INADA Naoki added the comment: > >> Yet one way -- make re.ASCII a local flag. Than we could just change the >> idpattern attribute to

[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread STINNER Victor
STINNER Victor added the comment: I don't really care if Python 3.7 is still slower than 3.6 with PR 3862. The speedup is significant, the change is short and safe, so the PR LGTM :-) We can implement further optimizations later ;-) By the way, speed.python.org can

[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It makes sense to report the performance gain only in comparison with the previous released version. I expect that re compiling is slower in 3.7 due to new features and optimizations. Generating more optimal code takes a time.

[issue31688] scope error

2017-10-04 Thread Mark Dickinson
Mark Dickinson added the comment: The code looks fine to me; I don't see any reason to expect an error. What error were you expecting, and why? -- nosy: +mark.dickinson ___ Python tracker

[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread STINNER Victor
STINNER Victor added the comment: > Did you compare the benchmarking results against 3.7 or 3.6? My lasted benchmark is on the master branch: original code ("ref") vs code patched with PR 3862 ("patch"). -- ___ Python

[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Did you compare the benchmarking results against 3.7 or 3.6? -- ___ Python tracker ___

[issue31619] Strange error when convert hexadecimal with underscores to int

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I missed the issue mentioned by Mark msg303331. I looked at the type of n, and okay, it is Py_ssize_t. But I forgot to check the type of digits and bits_per_char, and it is int. My fix doesn't guard from integer overflow. The

[issue31689] random.choices does not work with negative weights

2017-10-04 Thread Mark Dickinson
Mark Dickinson added the comment: @ariddell: What behaviour did you want to see here? It wouldn't have occurred to me to even try using `random.choices` with negative weights; forcing the weights to be nonnegative (with strictly positive sum) sounds like a natural

[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread STINNER Victor
STINNER Victor added the comment: Naoki: "I've added news entry about it." Nice. You might also mention the "optimization" in What's New in Python 3.7 doc, in the Optimisations section. The issue here is that it's only faster than Python 3.6, but Python 3.6 was

[issue31619] Strange error when convert hexadecimal with underscores to int

2017-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +3857 ___ Python tracker ___ ___

[issue31689] random.choices does not work with negative weights

2017-10-04 Thread Allen Riddell
New submission from Allen Riddell : Code to reproduce problem: population = list(range(10)) weights = list(-1 * w for w in range(10)) [random.choices(population, weights) for _ in range(1000)] will raise IndexError: 358 bisect = _bisect.bisect 359

[issue31688] scope error

2017-10-04 Thread abdullah patel
New submission from abdullah patel : there should be an error when this code is run. as I have not defined the arguments (I was told by my computer science teacher that it should not work in theory) and parameters but it clearly works. -- assignee:

[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread INADA Naoki
INADA Naoki added the comment: Thank you for benchmarking. I've added news entry about it. -- ___ Python tracker ___

[issue30465] FormattedValue expressions have wrong lineno and col_offset information

2017-10-04 Thread Eric V. Smith
Eric V. Smith added the comment: I think it's fixed. Closing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31671] IntFlag makes re.compile slower

2017-10-04 Thread STINNER Victor
STINNER Victor added the comment: Nice speedup! I ran a benchmark on PR 3862: 1002 ./python ~/prog/python/performance/performance/benchmarks/bm_regex_compile.py --inherit=PYTHONPATH -v -o patch.json 1003 git co master 1004 make 1005 ./python

[issue1759845] [2.7] subprocess.call fails with unicode strings in command line

2017-10-04 Thread STINNER Victor
Change by STINNER Victor : -- title: subprocess.call fails with unicode strings in command line -> [2.7] subprocess.call fails with unicode strings in command line ___ Python tracker

[issue31687] test_semaphore_tracker() of test_multiprocessing_spawn fails randomly (race condition?)

2017-10-04 Thread STINNER Victor
New submission from STINNER Victor : Recent example of the slow and busy (load of 8.05 with 2 CPUs) x86 Gentoo Refleaks 3.6 buildbot: http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.6/builds/111/steps/test/logs/stdio == CPU count: 2 ... 1:41:09

[issue1759845] subprocess.call fails with unicode strings in command line

2017-10-04 Thread Safihre
Safihre added the comment: Although this issue is very old, in case anyone else like us need this functionality I created a package that implements the proposed C-fix. https://pypi.python.org/pypi/subprocessww Simply "import subprocessww" and POpen is patched. We tested it

[issue31557] tarfile: incorrectly treats regular file as directory

2017-10-04 Thread Nitish
Nitish added the comment: Try 'tar xvf test.tar'. On Linux machine at least, it is in fact producing a tree of directories. Not a single file. So - in a way what Python is reporting is correct. -- ___ Python tracker

[issue31672] string.Template should use re.ASCII flag

2017-10-04 Thread INADA Naoki
INADA Naoki added the comment: Current pull request override `Template.flags = re.I` after class creation for backward compatibility, without any API change. But I'm not sure it's right approach. How many people who subclass string.Template expect non-ASCII match? If

[issue31672] string.Template should use re.ASCII flag

2017-10-04 Thread INADA Naoki
INADA Naoki added the comment: > Yet one way -- make re.ASCII a local flag. Than we could just change the > idpattern attribute to r'(?a:[_a-z][_a-z0-9]*)', without touching the flags > attribute. https://docs.python.org/3.6/library/re.html#regular-expression-syntax

[issue31672] string.Template should use re.ASCII flag

2017-10-04 Thread INADA Naoki
INADA Naoki added the comment: > When optimizing, please don't make API changes. This is not only optimization, but bugfix. Document of string.Template says: > By default, "identifier" is restricted to any case-insensitive ASCII > alphanumeric string (including

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Mark Dickinson
Mark Dickinson added the comment: The aim here is to capture the original Decimal value where possible, including the exponent information. (Unlike floats, trailing zeros in a `Decimal` instance are significant.) >>> from decimal import Decimal >>>