LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 01-12-2009, 05:47 AM   #1
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu 10.04, Debian Squeeze, Windoze 7
Posts: 512

Rep: Reputation: 35
Question python: AttributeError: 'list' object has no attribute 'Append'


Hi

I am working on a Wxpython application, where I create buttons and then want to destroy all the buttons again, so I can display others (like in a main menu)
To keep track of what objects have to be destroy()ed, I want to add them to a list:

code:
----------------

self.term_list = []

self.chords_button = wx.Button(self.panel, label="Train Chords")
self.Bind(wx.EVT_BUTTON, self.chords, self.chords_button)

self.term_list.Append(self.chords_button)


On this, Python drops the error,

AttributeError: 'list' object has no attribute 'Append'


which does not make sense, because lists always has a append attribute, right?

Stumped...

Markus
 
Old 01-12-2009, 05:49 AM   #2
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 41
Right, no "Append" but "append". Case-sensitive.
 
Old 01-12-2009, 05:56 AM   #3
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu 10.04, Debian Squeeze, Windoze 7
Posts: 512

Original Poster
Rep: Reputation: 35
Exclamation

blast, you are right!!

Did I miss something here? I thought python is case insensitive?
Or only certain things are case sensivite?


Markus
 
Old 01-12-2009, 05:58 AM   #4
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 41
No, I think it's all case-sensitive. Most programming languages nowadays are.

There aren't Java-like restrictions on how you name classes and modules, though.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Object Oriented Programming in Python LXer Syndicated Linux News 0 01-07-2009 07:20 AM
gentoo env-update AttributeError: 'module' object has no attribute 'env_update' linux_mopper Linux - Newbie 2 08-06-2008 02:20 PM
can javascript control the loop attribute of an embed object? BrianK Programming 3 06-27-2008 11:09 AM
Change group attribute according to a find list mad4linux Linux - General 8 04-19-2007 02:30 PM
Attribute error in python code digitalbrutus Programming 1 08-15-2006 04:39 PM


All times are GMT -5. The time now is 11:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration