[issue16279] namedtuple should compare equality with field names taken into account

2012-10-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nick, thanks for closing this one with a clear and accurate explanation. -- ___ Python tracker ___ __

[issue16279] namedtuple should compare equality with field names taken into account

2012-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: "... returned from an API that previously returned an ordinary tuple ..." -- ___ Python tracker ___ __

[issue16279] namedtuple should compare equality with field names taken into account

2012-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: So that they can be returned from an API without breaking backwards compatibility, named tuples are intentionally equivalent to the corresponding ordinary tuple: >>> from collections import namedtuple >>> Pair = namedtuple("Pair", "x y") >>> Pair(1, 2) == (1, 2)

[issue16279] namedtuple should compare equality with field names taken into account

2012-10-18 Thread Julian Berman
New submission from Julian Berman: I find the following to be unintuitive: Python 3.3.0rc1 (default, Sep 6 2012, 16:02:32) [GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.58)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from collections im