static attribute

Uwe Schmitt schmitt at num.uni-sb.de
Sat May 12 10:18:37 EDT 2001


hi,

i tried to use a static attribute _allNames as follows:


class Name:

   _allNames={}   

   def __init__(self,name):
      self.name=name
     _allNames[name]=self
		     
		        
X=Name("Xclass")

but i get NameError.... whats wrong ?

yours, uwe

-- 
Uwe.Schmitt at num.uni-sb.de      Universität des Saarlandes
phone: +49 (0)681/302-2468     Geb. 36.1, Zi. 4.17, PF 151150
                               D-66041  Saarbrücken
http://www.rocksport.de        http://www.rocksport.de/first_ride.mp3




More information about the Python-list mailing list