New submission from Samuel Isaacson:
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
--
components: Library (Lib)
messages: 249082
nosy: Samuel Isaacson
priority: normal
severity: normal
status: open
title: _asdict breaks when inheriting from a namedtuple
type: behavior
versions: Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24931
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com