cosmologicon / pywat

Python wats
1.22k stars 99 forks source link

Quiz answer 9 is wrong #11

Closed p-himik closed 9 years ago

p-himik commented 9 years ago

It is possible:

>>> x, y = '', 0 * 1e400
>>> sum(0 * x, y) == y
False
peter50216 commented 9 years ago

https://github.com/cosmologicon/pywat/blob/master/quiz.md#details-and-scope

In particular, the following are out of scope, and are not valid as missing values:

  • floats and unicode, which have enough edge cases in any language. This means that nan and inf are also out of scope. Strings, if they appear, only have ascii characters.