[Python-Dev] namedtuples bug between 3.3.2 and 3.4.1
Brynjar Smári Bjarnason
binni at binnisb.com
Sun Sep 14 12:13:03 CEST 2014
Hi.
I am using Python 3.4.1 installed with Anaconda. I tried the following
(expecting an OrderedDict as result):
>>>from collections import namedtuple
>>>NT = namedtuple("NT",["a","b"])
>>>nt = NT(1,2)
>>>print(vars(nt))
{}
so the result is an empty dict. In Python 3.3.2 (downgraded in the
same Anaconda environment) results in:
>>>print(vars(nt))
OrderedDict([('a', 1), ('b', 2)])
I haven't looked at the source code, I can do that later in the week
and see if I can pinpoint where this is happening. But any suggestions
what and where to fix this would be good :)
Cheers,
Brynjar
More information about the Python-Dev
mailing list