On 16/08/17 23:36, Howard Lawrence wrote: > class Address: > def _init_(self,Hs,St,Town,Zip): > self.HsNunber=Hs > self.Street=St > self.Town=Town > self.Zip=Zip > Addr=Address (7, ' high st', 'anytown', ' 123 456')
That looks suspiciously like my tutorial ;-) The answer is to use two underscores around init(): def __init__(...) not def _init_(...) This is explained in more detail in a box at the end of the data topic: http://www.alan-g.me.uk/l2p/tutdata.htm -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor