[Python-Dev] List insert at index that is well out of range - behaves like append

2014-09-14 Thread Harish Tech
I had a list a = [1, 2, 3] when I did a.insert(100, 100) [1, 2, 3, 100] as list was originally of size 4 and I was trying to insert value at index 100 , it behaved like append instead of throwing any errors as I was trying to insert in an index that did not even existed . Should it not thro

Re: [Python-Dev] namedtuples bug between 3.3.2 and 3.4.1

2014-09-14 Thread Antoine Pitrou
On Mon, 15 Sep 2014 02:13:53 +1000 Chris Angelico wrote: > On Sun, Sep 14, 2014 at 8:13 PM, Brynjar Smári Bjarnason > wrote: > > I am using Python 3.4.1 installed with Anaconda. I tried the following > > (expecting an OrderedDict as result): > > > from collections import namedtuple > NT =

Re: [Python-Dev] namedtuples bug between 3.3.2 and 3.4.1

2014-09-14 Thread Chris Angelico
On Sun, Sep 14, 2014 at 8:13 PM, Brynjar Smári Bjarnason wrote: > 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)) > {} >

[Python-Dev] namedtuples bug between 3.3.2 and 3.4.1

2014-09-14 Thread Brynjar Smári Bjarnason
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