Comment 1 for bug 1614338

Revision history for this message
asmeurer (asmeurer) wrote :

Seems like part of a larger issue of propagating type inference from literals. int.__eq__(int) returns bool; bool.__iter__() raises TypeError. I would love to see pyflakes do this, but it would be better to do it in a generic way, rather than picking and choosing random examples.

Note that == for general objects could return anything because of __eq__ (and there are definitely some libraries that use it as syntactic sugar).