[Tutor] problem creating a subclass

nick at javacat.f2s.com nick at javacat.f2s.com
Mon Mar 1 03:27:01 EST 2004


DOH! I see now, thankyou for the clarification.

Nick.


Quoting Alan Gauld <alan.gauld at blueyonder.co.uk>:

> 
> > Maybe I'm missing something obvious here but I don't see how Chris'
> > UList class is going to work at all. The class has no UList method,
> so
> > how is 'a = UList.UList(alist)' going to work ?
> 
> Because this is in another file from ULIst(actually the >>> prompt).
> So he imported the ULIst module and is accessing the ULIst class
> within the UList module:
> 
> import UList
> L = UList.Ulist()  # Ulist class within Ulist module
> 
> Compare with:
> 
> import sys
> sys.exit()
> 
> HTH
> Alan G.
> 
> 




------------------------------------------------- 
Everyone should have http://www.freedom2surf.net/ 



More information about the Tutor mailing list