[issue28637] Python startup performance regression

2016-11-08 Thread Wolfgang Maier
Wolfgang Maier added the comment: @serhiy.storchaka you've beaten me by a few minutes (still waiting for the test suite to finish). Your patch is "contaminated" by an additional change in collections/__init__.py though so I'm still uploading my version (which also tries

[issue28637] Python startup performance regression

2016-11-08 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +vinay.sajip ___ Python tracker <http://bugs.python.org/issue28637> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28716] Fractions instantiation revisited

2016-11-16 Thread Wolfgang Maier
New submission from Wolfgang Maier: I've spent a bit of time lately trying to optimize the instantiation of Fractions. This is related to Issue22464, but instead of focusing on constructing Fractions from ints, my attempts revolve around improving instantiation from strings, float

[issue28716] Fractions instantiation revisited

2016-11-16 Thread Wolfgang Maier
Wolfgang Maier added the comment: sure, I just happened to have the profiling available since I used it to optimize things. Here's similar microbenchmarks using perf: STRINGS === $ python -m perf timeit -s "from fractions import Fraction" "

[issue28716] Fractions instantiation revisited

2016-11-16 Thread Wolfgang Maier
Wolfgang Maier added the comment: No, I don't think the numeric tower ABC should be replaced by duck-typing. One of the very reasons the fractions module exists is that it showcases how to use the numeric tower. If you want a class to be picked up as a Rational it should be registered as

[issue28734] argparse: successive parsing wipes out nargs=? values

2016-11-18 Thread Wolfgang Maier
Wolfgang Maier added the comment: try this: parser.add_argument('file', nargs='?', default = argparse.SUPPRESS) I don't think this is a bug. The default for the default parameter is None so the behavior is consistent with the documentation.

[issue27583] configparser: modifying default_section at runtime

2016-11-19 Thread Wolfgang Maier
Wolfgang Maier added the comment: Well, you *can* change the value at runtime as you are demonstrating in your script, but you are misunderstanding the effect this will have. It *won't* cause a reevaluation of an already parsed config file. Instead it will affect the writing of the p

[issue22298] Lib/warnings.py _show_warning does not protect against being called with a file like object which is closed

2016-11-22 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +wolma ___ Python tracker <http://bugs.python.org/issue22298> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18943] argparse: default args in mutually exclusive groups

2016-11-22 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +wolma ___ Python tracker <http://bugs.python.org/issue18943> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    1   2   3