__call__ considered harmful or indispensable?

Skip Montanaro skip at pobox.com
Fri Aug 3 19:23:25 EDT 2007


Terry Reedy <tjreedy <at> udel.edu> writes:

> > The bug went something like this:
> >
> >     obj = some.default_class
> >     ...
> >     if some_other_rare_condition_met:
> >         ... several lines ...
> >         obj = some.other_class()
> 
> Should that have been some.other_class (without the ()s?).

Either that or default value should have been an instance of
some.default_class.  Didn't really matter in this case...

Skip





More information about the Python-list mailing list