Message193598
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]) |
|
Date |
User |
Action |
Args |
2013-07-23 12:44:09 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, techtonik |
2013-07-23 12:44:09 | amaury.forgeotdarc | set | messageid: <1374583449.28.0.0648949143623.issue18535@psf.upfronthosting.co.za> |
2013-07-23 12:44:09 | amaury.forgeotdarc | link | issue18535 messages |
2013-07-23 12:44:08 | amaury.forgeotdarc | create | |
|