[Tutor] Class within class, or...?

Alan Gauld alan.gauld at freenet.co.uk
Wed Jan 26 23:31:51 CET 2005


class Reader:
   def __init__(self, filePath=""):
       ....
       self.dataA=SchemaA()
       self.dataB=SchemaB()
       ...

class SchemaA():

class SchemaB():

You probaly should put the Schema definitions before the Reader 
definition. Otherwise what you suggest is absolutely the norm 
for OO programming.

Alan G.


More information about the Tutor mailing list