On 07/11/2014 07:04 AM, Andreas Maier wrote: > Am 09.07.2014 03:48, schrieb Raymond Hettinger: >> >> Personally, I see no need to make the same mistake by removing >> the identity-implies-equality rule from the built-in containers. >> There's no need to upset the apple cart for nearly zero benefit. > > Containers delegate the equal comparison on the container to their elements; they do not apply identity-based comparison > to their elements. At least that is the externally visible behavior. If that were true, then [NaN] == [NaN] would be False, and it is not. Here is the externally visible behavior: Python 3.5.0a0 (default:34881ee3eec5, Jun 16 2014, 11:31:20) [GCC 4.7.3] on linux Type "help", "copyright", "credits" or "license" for more information. --> NaN = float('nan') --> NaN == NaN False --> [NaN] == [NaN] True -- ~Ethan~
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4