Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60660

Re: error

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:error': 0.03; 'attribute': 0.07; '[0]': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '[1].': 0.16; 'i.e': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'wed,': 0.18; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'fine': 0.24; 'defined': 0.27; 'gets': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'work.': 0.31; '"",': 0.31; 'file': 0.32; 'class': 0.32; '(most': 0.33; 'but': 0.35; 'should': 0.36; 'error.': 0.37; 'list': 0.37; 'list.': 0.37; 'nov': 0.38; 'others.': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'recent': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; "you're": 0.61; 'first': 0.61; 'pick': 0.64; 'different': 0.65; 'dont': 0.67; 'received:myvzw.com': 0.84; 'top.': 0.84; '2013': 0.98
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dave Angel <davea@davea.name>
Subject Re: error
Date Wed, 27 Nov 2013 21:30:20 -0500
References <f72cc61d-eb91-459a-8099-3e2b1be743ec@googlegroups.com> <f72cc61d-eb91-459a-8099-3e2b1be743ec@googlegroups.com>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host 151.sub-70-208-162.myvzw.com
In-Reply-To <f72cc61d-eb91-459a-8099-3e2b1be743ec@googlegroups.com>
User-Agent Groundhog Newsreader for Android
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3335.1385605784.18130.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1385605784 news.xs4all.nl 15945 [2001:888:2000:d::a6]:39876
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60660

Show key headers only | View raw


On Wed, 27 Nov 2013 16:37:37 -0800 (PST), speen saba 
<moonlightmadness86@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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

error speen saba <moonlightmadness86@gmail.com> - 2013-11-27 16:37 -0800
  Re: error Cameron Simpson <cs@zip.com.au> - 2013-11-28 11:55 +1100
  Re: error Dave Angel <davea@davea.name> - 2013-11-27 21:30 -0500

csiph-web