On Wed, 27 Nov 2013 16:37:37 -0800 (PST), speen saba
<moonlightmadnes...@gmail.com> wrote:
p = [1,2]
And below is the error. Evrything works fine untill class polar
point, but when I try to pick point (instance) p in the list i.e x,y
(1,2,3,1). It does not work. I mean p.x gets the error where it
should give me the value of x. And i know this error will go all the
way down to def__cmp if i dont fic it from top.
>>> p.x
Traceback (most recent call last):
File "<pyshell#46>", line 1, in <module>
p.x
AttributeError: 'list' object has no attribute 'x'
You have 4 different implementations, but you're mixing the first
with the others. Since p is a list, you need to use list semantics,
p [0] and p [1]. The .x attribute is not defined on a list.
--
DaveA
--
https://mail.python.org/mailman/listinfo/python-list