Accessing attributes?

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Tue Jun 12 12:24:40 CEST 2007


In <tZGdnTD7ycxj8vPbnZ2dnUVZ8sjinZ2d at pipex.net>, Jeff Rollin wrote:

> (Initializing Calamity Jane)
> Traceback (most recent call last):
>   File "/home/jef/bin/objvar.py", line 49, in <module>
>     Person.how_many()
> AttributeError: class Person has no attribute 'how_many'
> 
> Where am I going wrong?

Looking at the indention of the code I would say you just have an
`__init__()` and all other ``def``\s are local functions to that method.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list