[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-08-26 Thread Elias Zamaria
Elias Zamaria added the comment: I updated my GitHub username. For the record, it used to be mikez302, and now it is elias6. -- ___ Python tracker <https://bugs.python.org/issue32

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-23 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: Mark, you have some good points. I didn't fully think about the implications of my change. I undid the change to _operator_fallbacks. I updated the tests to expect 1.0 // 1/10 to equal 9.0 and 1.0 % 1/10 to equal 0.099

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-15 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: Mark, I tried `Fraction(10**23) // 1e22`, and I got 10. Your `10**23 // 1e22` example was strange, but then `int(1e23)` and got 1611392. That is kind of unexpected but I think it is rare for anyone to do somethin

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-14 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: Mark, what you described (operator_fallbacks for both __rfloordiv__ and __floordiv__, and for both __rmod__ and __mod__) was my initial approach. But that broke one test (which floor-divides 1.0 by 1/10 and expects the

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-05 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: Done. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32968> ___ __

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-02 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: Any suggestions as to what I should do? I can either update my pull request with my floordiv change, or create a new pull request, or wait a while to see if anyone else has any opinion on changing the be

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-01 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: I added the pull request. It includes only my changes to modulo, and not the ones to floordiv. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-01 Thread Elias Zamaria
Change by Elias Zamaria <mikez...@gmail.com>: -- keywords: +patch pull_requests: +5721 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-03-01 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: Mark, you said "if there's a test that's explicitly checking that `my_fraction // my_float` returns something of type `int`, then the behaviour is clearly intentional". I see exactly that. See https://github.com/pyt

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-02-28 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: Mark, you have some good ideas. A fraction modulo a float is a float, and an integer modulo infinity produces itself as a float, so it seems reasonable that a fraction modulo infinity should be itself converted to a float. I

[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-02-27 Thread Elias Zamaria
New submission from Elias Zamaria <mikez...@gmail.com>: Usually, a positive finite number modulo infinity is itself. But modding a positive fraction by infinity produces nan: >>> from fractions import Fraction >>> from math import inf >>> 3 % inf 3.0 >>&g

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2018-01-31 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: INADA, what is ML? How do I restart the discussion? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2018-01-31 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: What else needs to be done with this issue? Can someone merge my pull request? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2017-11-14 Thread Elias Zamaria
Elias Zamaria <mikez...@gmail.com> added the comment: Can someone here merge my pull request? If not, then what else needs to be done for my change to be included in 3.7? -- ___ Python tracker <rep...@bugs.python.org> <https://

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2017-08-29 Thread Elias Zamaria
Changes by Elias Zamaria <mikez...@gmail.com>: -- pull_requests: +3279 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27923> ___ _

[issue29076] Py 3.6 Mac installer doesn't update "python3" shell command

2017-01-03 Thread Elias Zamaria
Elias Zamaria added the comment: Ned, that sounds plausible. I think I started using fish after I installed Python 3.5, but before I installed Python 3.6. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29076] Python 3.6 installer doesn't update "python3" shell command

2016-12-26 Thread Elias Zamaria
Elias Zamaria added the comment: I just ran "ls -le ~/.bash_profile" and got this result: -rw-r--r--+ 1 Elias staff 1057 Jul 2 11:04 /Users/Elias/.bash_profile 0: user:_spotlight inherited allow read,execute,readattr,readextattr,re

[issue29076] Python 3.6 installer doesn't update "python3" shell command

2016-12-26 Thread Elias Zamaria
Elias Zamaria added the comment: I just ran "ls -l ~/.bash_profile" and got the following output: -rw-r--r--+ 1 Elias staff 1057 Jul 2 11:04 /Users/Elias/.bash_profile -- ___ Python tracker <rep...@bugs.python.org> <htt

[issue29076] Python 3.6 installer doesn't update "python3" shell command

2016-12-26 Thread Elias Zamaria
New submission from Elias Zamaria: I have a Mac running OS X 10.11.6, Python 3.5.2, and fish 2.3.1. I installed Python 3.6.0, and everything seemed to work fine. However, I typed "python3" in my shell and it started Python 3.5.2. I restarted my shell and typed "python3",

[issue29076] Python 3.6 installer doesn't update "python3" shell command

2016-12-26 Thread Elias Zamaria
Changes by Elias Zamaria <mikez...@gmail.com>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29076> ___ __

[issue28625] multiprocessing.Pool.imap swallows exceptions thrown by generators

2016-11-15 Thread Elias Zamaria
Elias Zamaria added the comment: I tried my code in Python 3.6.0b3 and got the same result. -- versions: +Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28625] multiprocessing.Pool.imap swallows exceptions thrown by generators

2016-11-06 Thread Elias Zamaria
New submission from Elias Zamaria: I have the following code: from multiprocessing import Pool def double(x): return 2 * x def get_numbers(): raise Exception("oops") yield 1 yield 2 print(list(Pool(processes=2).imap(double, get_numbers( I would expect i

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-20 Thread Elias Zamaria
Elias Zamaria added the comment: Ethan, by "Ned", I am guessing that you are referring to Ned Batchelder. Is that right? If so, do we need to put him on the nosy list or do anything else to bring this to his attention? -- ___ Python tr

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-12 Thread Elias Zamaria
Elias Zamaria added the comment: I looked through the email thread. I can remove the DeprecationWarnings, but before I do that, I would like to ask something: How "official" are the things discussed in the thread? Are they supposed to be part of the PEP? Are they supposed t

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-12 Thread Elias Zamaria
Elias Zamaria added the comment: Martin, I made another attempt to understand what you are trying to tell me about the patch, and I'm still confused. It seems that to make the patch merge cleanly, I need to get the patch URL from this page, and to get the patch URL, I need to upload the patch

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-04 Thread Elias Zamaria
Elias Zamaria added the comment: Martin, where am I supposed to get the patch URL from? Also, is it too soon to issue DeprecationWarnings? Would it be more appropriate if they are PendingDeprecationWarnings instead? -- ___ Python tracker <

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-01 Thread Elias Zamaria
Elias Zamaria added the comment: Here is a patch with all of my latest changes, including the changes that Martin suggested for the tests. -- Added file: http://bugs.python.org/file44332/pep467_attempt2.patch ___ Python tracker <

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-01 Thread Elias Zamaria
Elias Zamaria added the comment: I tried running `hg import --no-commit "$(xclip -o)"` and got the following result: bash: xclip: command not found abort: need at least one patch to import I am using OS X 10.11.6 and Mercurial 3.8.2. I did a bit of quick research on xclip, but it

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-08-31 Thread Elias Zamaria
Elias Zamaria added the comment: @martin.panter, I am familiar with Mercurial, and with the concept of rebasing, but I don't understand what you are trying to tell me. I made these changes in several local branches, and then merged them all together in one branch. How can I rebase it onto

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-08-31 Thread Elias Zamaria
Elias Zamaria added the comment: Here is a patch with some changes to the docs. I don't know if the descriptions are good enough, but it should hopefully identify what parts of the docs need to be changed. -- Added file: http://bugs.python.org/file44313/pep467_doc_changes.patch

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-08-31 Thread Elias Zamaria
New submission from Elias Zamaria: This is my attempt at implementing PEP 467. I am not an expert in the details of the Python interpreter, and this is my first time working on a big project in C, so I am not sure if I am doing things in the most elegant or efficient way, but it seems to work

[issue19980] Improve help('non-topic') response

2014-04-30 Thread Elias Zamaria
Elias Zamaria added the comment: Sorry for the late response but I have been busy with various things. I may be able to work on this but I don't know when or how long it will take me. I would suggest that someone else work on it if anyone wants it done any time soon. I am sorry about

[issue20849] add exist_ok to shutil.copytree

2014-03-08 Thread Elias Zamaria
Elias Zamaria added the comment: I am not sure. I am not on the python-ideas mailing list, and I am not sure what adding and maintaining the discussion would entail, or if I would have the time to do it or want to deal with the clutter in my inbox. I just committed this patch because it seemed

[issue19980] Improve help('non-topic') response

2014-03-03 Thread Elias Zamaria
Elias Zamaria added the comment: Here is a patch that addresses the empty string problem described by @BreamoreBoy. I am not sure if this is the best way to handle it but it is better than what we have now. -- Added file: http://bugs.python.org/file34281/empty-help-response.patch

[issue20849] add exist_ok to shutil.copytree

2014-03-03 Thread Elias Zamaria
Elias Zamaria added the comment: Here is a patch that adds the option. I am not very familiar with the internals of shutil and os so I would recommend that someone else review it. I haven't added any tests. I can try to if anyone wants but I am not sure how long it will take me or if I

[issue19980] Improve help('non-topic') response

2013-12-21 Thread Elias Zamaria
Elias Zamaria added the comment: I have created a patch that fixes this issue that terry.reedy described. It does not fix the problem described BreamoreBoy involving the empty string. Please note that this is my first patch for Python so let me know if I am missing something or if I can do

[issue11705] sys.excepthook doesn't work in imported modules

2011-03-28 Thread Elias Zamaria
New submission from Elias Zamaria mikez...@gmail.com: I am trying to design a Python program that logs all uncaught exceptions using the logging module. I am doing this by using the sys.excepthook function to override the default exception handling. I noticed that if I run the program

[issue11705] sys.excepthook doesn't work in imported modules

2011-03-28 Thread Elias Zamaria
Elias Zamaria mikez...@gmail.com added the comment: Andreas, your explanation seems plausible. What has changed between 2.7 and 2.7.1 such that doing the same thing produces different results? -- ___ Python tracker rep...@bugs.python.org http

[issue11705] sys.excepthook doesn't work in imported modules

2011-03-28 Thread Elias Zamaria
Elias Zamaria mikez...@gmail.com added the comment: Is my issue a bug or is it expected behavior? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11705

[issue10592] pprint module doesn't work well with OrderedDicts

2010-11-30 Thread Elias Zamaria
New submission from Elias Zamaria mikez...@gmail.com: If I try to pretty-print an ordered dictionary, it doesn't show nicely. Instead of having each key-value pair on its own line, the whole thing shows up on one long line, which wraps many times and is hard to read. I can provide an example

[issue10592] pprint module doesn't work well with OrderedDicts

2010-11-30 Thread Elias Zamaria
Elias Zamaria mikez...@gmail.com added the comment: I forgot to mention, someone came up with this suggestion (http://stackoverflow.com/questions/4301069/any-way-to-properly-pretty-print-ordered-dictionaries-in-python/4303996#4303996). It is not the best, but the output is better than how