problems with circular references

Steve Holden sholden at holdenweb.com
Thu Mar 28 08:33:06 EST 2002


"jimh" <jim at jim.jim> wrote in message news:a7tgkv$t3m$1 at web1.cup.hp.com...
> >
[...]
>
> I will have to think about that one.  When a class accesses the
> MessageCatalog, it may be requesting message text from _other_ classes'
> errors.  Also, these are often called from cgi scripts, so they are run as
a
> one-shot deal.  Also(!), the case of an error is (theoretically) uncommon
> and the MessageCatalog is only instantiated if an error occurs.  That way,
> if no error occurs, there is no overhead with importing the
MessageCatalog.
>
Bear in mind that the import will only cause the module to be executed once
no matter how many times it is imported. So importing it may not be as much
of an ovberhead as you imagine (especially since you seem to be happy to
import fifty other modules to make up your program).

regards
 Steve






More information about the Python-list mailing list