Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

I can see that making generators unhashable would have found your bug earlier, 
but it is otherwise unjustified: generators are just objects that are compared 
by identity. It would break other people's code, which is a very invasive 
change to make just so that a small subset of "forgot to call tuple" bugs might 
sometimes be found earlier.

Personally, I think that Serhiy's comment that there is "a chance" that this 
will be accepted is over-optimistic, but either way this would need to have a 
PEP.

I'm going to close this as "Not a bug" but that doesn't mean discussion has to 
stop. If you feel strongly enough about this issue to write a PEP proposing 
this change, please take the discussion to the Python-Dev mailing list with a 
summary and see if you can get somebody to sponsor the PEP. If you do, feel 
free to re-open as an Enhancement.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38769>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to