[issue25177] OverflowError in statistics.mean when summing large floats

2015-09-19 Thread Bar Harel
Bar Harel added the comment: Alright, Seems like the problem is bigger than I thought. PEP 238 (https://www.python.org/dev/peps/pep-0238/) mentions that problem. Using the new division, // will cause a floor while / will cause an OverflowError. An ugly way around it involves type checking or

[issue25177] OverflowError in statistics.mean when summing large floats

2015-09-19 Thread Bar Harel
Bar Harel added the comment: Seems like this is the only viable option. It fixes the OverflowError but comes at the cost of precision and time. Another option would be to try/except the overflow error and only then return the slower method. Regarding the data [8.988465674311579e+307

[issue25175] Documentation-Tkinter Clarify module spelling change in Python 3 docs

2015-09-19 Thread Bar Harel
Bar Harel added the comment: Is this good? :-) -- keywords: +patch nosy: +bar.harel Added file: http://bugs.python.org/file40520/Issue25175.patch ___ Python tracker <http://bugs.python.org/issue25

[issue25177] OverflowError in statistics.mean when summing large floats

2015-09-27 Thread Bar Harel
Bar Harel added the comment: Alright, I issued a fix, now testing it -- ___ Python tracker <http://bugs.python.org/issue25177> ___ ___ Python-bugs-list mailin

[issue25177] OverflowError in statistics.mean when summing large floats

2015-09-27 Thread Bar Harel
Bar Harel added the comment: Alright, this patch passed all tests. I've changed the function sum to include a new parameter called fraction which decides whether to return a fraction or not. It might be useful in more scenarios due to the fact fractions are more accurate. I'm still

[issue16802] fileno argument to socket.socket() undocumented

2015-10-02 Thread Bar Harel
Bar Harel added the comment: Here you go. -- nosy: +bar.harel Added file: http://bugs.python.org/file40656/Issue16802_rev2.patch ___ Python tracker <http://bugs.python.org/issue16

[issue25175] Documentation-Tkinter Clarify module spelling change in Python 3 docs

2015-10-05 Thread Bar Harel
Bar Harel added the comment: I guess you're correct, a simple mistake one time mistake shouldn't require the changing of the docs. -- ___ Python tracker <http://bugs.python.o

[issue24505] shutil.which wrong result on Windows

2015-10-05 Thread Bar Harel
Bar Harel added the comment: Unfortunately that patch will not help for files like "python.exe.exe", and double ext which sometimes happens. I'm on it. Should take me a day or two, more problems might arise along the way. Thanks Bob for alerting. Regarding the uppercase,

[issue24505] shutil.which wrong result on Windows

2015-10-05 Thread Bar Harel
Bar Harel added the comment: Thanks eryksun. Regarding the slashes, it should be fine as the input should be with backslashes anyway. We don't need to fix the input as fixing it would result in inaccurate data. Just as it won't work without backslashes on CMD, it shouldn't wor

[issue25177] OverflowError in statistics.mean when summing large floats

2015-10-10 Thread Bar Harel
Bar Harel added the comment: Any comments on the patch? -- ___ Python tracker <http://bugs.python.org/issue25177> ___ ___ Python-bugs-list mailing list Unsub

[issue25177] OverflowError in statistics.mean when summing large floats

2015-11-07 Thread Bar Harel
Bar Harel added the comment: Anyway, yes, it should be quite the same. I can provide some benchmarks tomorrow if you wish. -- ___ Python tracker <http://bugs.python.org/issue25

[issue26734] Repeated mmap\munmap calls during temporary allocation

2016-04-11 Thread Bar Harel
New submission from Bar Harel: After asking a question regarding performance in StackOverflow, I received an answer which seemed like a design problem in object allocation. This is the question: http://stackoverflow.com/q/36548518/1658617 Seems like it ignores the garbage allocation settings

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-11 Thread Bar Harel
Changes by Bar Harel : -- nosy: +bar.harel ___ Python tracker <http://bugs.python.org/issue26601> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-11 Thread Bar Harel
Bar Harel added the comment: Any idea how to test it then? I found this happening by chance because I care about efficiency too much. We can't just stick timeit in random areas and hope to get results. -- ___ Python tracker <http://bugs.py

[issue27141] Fix collections.UserList shallow copy

2016-09-26 Thread Bar Harel
Bar Harel added the comment: Alright. 2 patches are available. opt_1 makes the use of __copy__. Advantages: - Clean - Does not affect pickling at all - More memory efficient Disadvantages: - Might be missing something from the normal copy mechanism (e.g. UserList doesn't impl

[issue27141] Fix collections.UserList shallow copy

2016-09-26 Thread Bar Harel
Changes by Bar Harel : Added file: http://bugs.python.org/file44833/issue27141_patch_rev1_opt2.patch ___ Python tracker <http://bugs.python.org/issue27141> ___ ___ Pytho

[issue27141] Fix collections.UserList shallow copy

2016-09-26 Thread Bar Harel
Bar Harel added the comment: I personally prefer the __copy__ mechanism as I think a bugfix shouldn't be 10% backwards compatible, chances of issues are low, and it's cleaner, more efficient and how things should be. -- ___ Pyth

[issue27141] Fix collections.UserList shallow copy

2016-10-13 Thread Bar Harel
Bar Harel added the comment: Bumposaurus Rex -- ___ Python tracker <http://bugs.python.org/issue27141> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    1   2