general class functions

Robert Brewer fumanchu at amor.org
Thu Nov 25 13:49:19 EST 2004


syd wrote:
> Thanks for everyone's help on this thread.  Right now, I've got a
> general class ("Container") holding items that can be accessed by item
> attribute values through __getattr__ functions.
> 
> My various classes use Container as a subclass.  Right now, I 
> keep both
> classes  in the same file, and everything works great.  
> However, when I
> move Container to a separate file and "from myClasses import 
> Container"
> to use this general class, I seem to lose all of the __getattr__
> functionality while retaining the other functions in Container.
> Does anyone know why this happens and how I can get around this??

Not without seeing some code. Show us your Container class and one of
the callers.


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org



More information about the Python-list mailing list