[Tutor] Newbie problems

Brendon bren@europe.nl.com
Thu, 28 Jun 2001 11:20:05 +0200


On Thursday 28 June 2001 11:03, you wrote:
> On  0, Brendon <bren@europe.nl.com> wrote:
> > >>>class Address:
> >
> > ...   def __init__(self, Hs, St, Town, Zip):
> > ...     self.HsNumber = Hs
> > ...     self.Street = St
> > ...     self.Town = Town
> > ...     self.ZipCode = Zip
> >
> > Addr = Address(7,"High St","Anytown","123 456")
> >
> >
> > which gives the following error:
> > ---
> > Traceback (innermost last):
> >   File "<stdin>", line 1, in ?
> > NameError: Address
>
> This should work fine. Are you sure typed the "Addr =" line after the class
> definition, back at the ">>>" prompt? If the prompt was still "..." then
> you need an empty line there to end the class.

ah, thanks everyone. i didnt know an empty line was required.

cheers, 


Brendon