LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 04:47 AM   #1
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Rep: Reputation: 56
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, 04:49 AM   #2
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

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

Original Poster
Rep: Reputation: 56
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, 04:58 AM   #4
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
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



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 06:20 AM
gentoo env-update AttributeError: 'module' object has no attribute 'env_update' linux_mopper Linux - Newbie 2 08-06-2008 01:20 PM
can javascript control the loop attribute of an embed object? BrianK Programming 3 06-27-2008 10:09 AM
Change group attribute according to a find list mad4linux Linux - General 8 04-19-2007 01:30 PM
Attribute error in python code digitalbrutus Programming 1 08-15-2006 03:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:44 AM.

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
Open Source Consulting | Domain Registration