PIDDLE bug?
Tim Peters
tim_one at email.msn.com
Sat May 8 14:36:13 EDT 1999
[Frank.Derville]
> I have download piddlePIL for evaluation and I have run the
> piddlePIL.test()
> (I am using python 1.5.1 and PIL 1.0b1)
>
> I have two problems running it :
> 1) In piddle.py there is an error raised in canvas.drawFigure :
> the function extend is called on a list.
Do you mean "extend(list)" or "list.extend(x)"?
> I have never heard of such function and have not even seen it
> in the python 1.5.2 doc.
I don't know anything about piddlePIL, but lists have a new "extend" method
in 1.5.2. See "2.1.5.2 Mutable Sequence Types" in the 1.5.2 library manual.
s.extend(x) same as s[len(s):len(s)] = x
>>> s = [1, 2, 3]
>>> s.extend(['a', 'b', 'c'])
>>> s
[1, 2, 3, 'a', 'b', 'c']
>>>
time-for-an-upgrade-ly y'rs - tim
More information about the Python-list
mailing list