On Jun 3, 5:52 pm, Steve Howell <[EMAIL PROTECTED]> wrote:

> The pitfall here is that to reduce code duplication,
> you might initialize certain variables in a method
> called by __init__, because your object might want to
> return to its initial state.

This is a good point.  I was thinking that this analysis would
occur during module loading; i.e. it would be the equivalent of Java's
classloading.

What if the startup code analysis just extended to methods called
during __init__?
That seems like a relatively straightforward extension.  Remember we
aren't actually *executing*
the startup code in my proposal; we are just analyzing it for all
possible execution paths which cause
a member variable assignment.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to