[issue18975] timeit: Use thousands separators and print number of loops per second

2017-08-27 Thread Cheryl Sabella
Cheryl Sabella added the comment: Reviewing this patch, it appears that the PEP8 changes to timeit.py are already in the source and the discussion of the thousands separator is no longer an issue with the underscore changes in 3.6 (meaning underscore now seems the way to separate digits in lar

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-16 Thread Jakub Stasiak
Jakub Stasiak added the comment: That's right, I was actually wondering about it few minutes before you pointed it out. Find new patch attached. -- Added file: http://bugs.python.org/file31792/timeit-v4-actual-changes.patch ___ Python tracker

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Inconsistency: "sec per loop" vs. "loops/s". -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm fine with the change too. Tim, what do you think? Speaking of which, some examples were really done with an old machine: $ python -m timeit 'try:' ' str.__bool__' 'except AttributeError:' ' pass' - 10 loops, best of 3: 15.7 usec per loop + 100

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > My vote is no separators. But I'm just one vote :) Seconded. -- ___ Python tracker ___ ___ Pyt

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-15 Thread R. David Murray
R. David Murray added the comment: My vote is no separators. But I'm just one vote :) -- ___ Python tracker ___ ___ Python-bugs-list

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-15 Thread Jakub Stasiak
Jakub Stasiak added the comment: Antoine: I agree that it does look weird to have thousands separators at one place and not at the other but IMO it's still slightly better - the number formatted with separators is simply more readable that separator-less one. R. David Murray: what's the accept

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread R. David Murray
R. David Murray added the comment: I do not find a space to be an acceptable separator, sorry. -- ___ Python tracker ___ ___ Python-bu

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > So: > > 1 loops, best of 3: 34.6 usec per loop (28 870 loops/s) Looks fine to me (though having a decimal space at the right and not at the left looks a bit weird). -- ___ Python tracker

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Changes by Jakub Stasiak : Added file: http://bugs.python.org/file31684/timeit-v3-pep8.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: To me the point of this patch is adding number of loops per second information - using thousands separators was just an addition which I'm happy to drop. Please find attached 2 patches: - one containing actual changes - loops per second added, fractional part is

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Tim Peters
Tim Peters added the comment: -1 from me, and I'm a comma-loving American ;-) I'm sure lots of code in the wild parses this output - Serhiy isn't the only one doing it. -- ___ Python tracker _

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread R. David Murray
R. David Murray added the comment: I'm with Serhiy on this. So if separators are added, I would say they *must* be optional. Presumably if they are added they should be locale dependent :) All of which may well make it more complicated than it is worth. -- nosy: +r.david.murray ___

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm afraid the adding any separators will make some people angry. With a comma or space it no more a valid number in Python and many other languages and can't be copy/pasted and parsed. Actually I sometimes use small shell scripts to run "python -m timeit" a

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I personally dislike the "," as thousands separator, and if a > separator is added at all I would prefer a space as defined in the SI > standard[0]. Then you really want a non-breaking space ;-) (as a French person who's used to commas as decimal points, cou

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: I agree with both notes. Splitting the patch won't be a problem. As much as I don't fancy "," as thousands separator either - I just used what's in the standard library but I'll think about the best way of putting spaces there. --

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Ezio Melotti
Ezio Melotti added the comment: I personally dislike the "," as thousands separator, and if a separator is added at all I would prefer a space as defined in the SI standard[0]. The PEP8 changes should also me moved to a separate patch IMHO; the other changes are OK grouped together. [0]: http

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: Oops, forgot to patch the tests, please find correct patch attached. -- Added file: http://bugs.python.org/file31673/timeit-v2.patch ___ Python tracker _

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
New submission from Jakub Stasiak: This patch includes: * making code more PEP8-compatible and refactoring it a bit * printing number of loops per second when using command line interface * using thousands separators when printing numbers of loops (also in command line interface) * changing exam