Message249082
When inheriting from namedtuples, _asdict and __dict__ return empty dictionaries:
from collections import namedtuple
class Point(namedtuple('_Point', ['x', 'y'])):
pass
a = Point(3, 4)
print(a._asdict() == {})
gives False; it is True on Python 2.7.6 |
|
Date |
User |
Action |
Args |
2015-08-24 23:49:48 | Samuel Isaacson | set | recipients:
+ Samuel Isaacson |
2015-08-24 23:49:48 | Samuel Isaacson | set | messageid: <1440460188.11.0.136200791288.issue24931@psf.upfronthosting.co.za> |
2015-08-24 23:49:48 | Samuel Isaacson | link | issue24931 messages |
2015-08-24 23:49:47 | Samuel Isaacson | create | |
|