News for hackers. Stuff that matters.
Re:What’s New In Python 3.6 by deniska on Wednesday December 07, 2016 @12:52PM (#13124501)
Be careful with named tuples:

    >>> from collections import namedtuple
    >>> Time = namedtuple('Time', ['hours', 'minutes'])
    >>> Point = namedtuple('Point', ['x', 'y'])
    >>> t = Time(hours=7, minutes=40)
    >>> p = Point(x=7, y=40)
    >>> p == t
    True
They're still tuples. They're meant more as a tool for making an already existing tuple mess slightly more managable rather than creating a new mess.

For making plain data objects take less boilerplate to create have a look at attrs: https://attrs.readthedocs.io

Re:What’s New In Python 3.6 by SEJeff on Wednesday December 07, 2016 @01:23PM (#13124800)
Strong +1 for attrs. It is a really nice library and quite easy to use.
Re:What’s New In Python 3.6 by tedmiston on Saturday December 10, 2016 @01:33PM (#13147076)
Interesting find with attrs. My main use case for namedtuples is a class as a data container which doesn't require any special methods. This might be a better alternative.
Re:What’s New In Python 3.6 by thijsvandien on Wednesday December 07, 2016 @04:57PM (#13126641)
Ugh, that's terrible... Thanks for pointing it out!