Implicit initialization is EXCELLENT
Stefaan Himpe
stefaan.himpe at gmail.com
Tue Jul 5 15:31:44 EDT 2011
Hello,
I agree with the contents of this post.
I see a similar problem with API's requiring to initialize all kinds of
data using setters/properties instead of receiving it in the initializer
(or constructor).
> Python generally follows this design. Apart from files, I can't easily think
> off the top of my head of any types that require a separate
> open/start/activate call before they are usable.
database connections, network connections, spawning expensive
processes/threads, things that benefit from lazy evaluation...
> Now, I have an ulterior motive in raising this issue... I can't find the
> original article I read! My google-fu has failed me (again...). I don't
> suppose anyone can recognise it and can point me at it?
My sarcasm detector warns me not to add a link, although perhaps it's
time for recalibration (after all, summer season started) :-)
Best regards,
Stefaan.
More information about the Python-list
mailing list