This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, techtonik
Date 2013-07-23.12:44:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1374583449.28.0.0648949143623.issue18535@psf.upfronthosting.co.za>
In-reply-to
Content
namedtuple has a _replace method, but I agree that it would be an incompatible change. "namedlist" someone?

class tcattributes(object):
    __slots__ = ['iflag', 'oflag', 'cflag', 'lflag', 'ispeed', 'ospeed', 'cc']

    def __new__(cls, values):
        self = object.__new__(cls)
        for attr, value in zip(cls.__slots__, values):
            setattr(self, attr, value)
        return self

    def __getitem__(self, index):
        return getattr(self, self.__slots__[index])
History
Date User Action Args
2013-07-23 12:44:09amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, techtonik
2013-07-23 12:44:09amaury.forgeotdarcsetmessageid: <1374583449.28.0.0648949143623.issue18535@psf.upfronthosting.co.za>
2013-07-23 12:44:09amaury.forgeotdarclinkissue18535 messages
2013-07-23 12:44:08amaury.forgeotdarccreate