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

Looks like we have a stand-off between core devs, and no BDFL to make a ruling.

There is support for the feature from at least Barry and Raymond  (although I 
think Guido was cool on the idea, maybe?). Gregory, do you feel strongly enough 
about this that you would reverse the commit if Serhiy just went ahead and 
committed it? Nobody wants a revert war :-)

To me, this seems like a low-cost feature that will help some developers 
without inconveniencing anyone. As Serhiy points out, SyntaxWarning is only 
emitted when the code is compiled, so it is only going to be visible to the 
developer of the module, not the user of the module.

Let's not allow the perfect be the enemy of the good enough. I think this is a 
helpful feature for developers, and as Raymond says it will help teach 
beginners the difference between `is` and equality. The people who are most 
prone to making this mistake are the ones least likely to be using a linter. 
And we know it is helpful: Serhiy already used it to find a bug in IDLE.

Gregory, you wanted to close this as not a bug, but nobody says it is a bug, it 
is an enhancement. And I think there is consensus that this *is* an 
enhancement. Nobody has said that there are good use cases for using `is` on 
literals in production code.

----------

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

Reply via email to