[Python-Dev] Default constructor values (Re: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.134,1.135)

Guido van Rossum guido@python.org
Thu, 12 Jun 2003 09:44:30 -0400


> > Types with constructors that insist on an argument are problematic to
> > generic code that tries to instantiate a type by simply calling it.
> 
> Why on earth would you be trying to instantiate something
> without having any idea what parameters are required?

It could be the other way though: something could have a protocol
where you can pass in a factory function that's called without
arguments, and maybe you'd like to be able to pass it a built-in
type.  Something very close to this happened to me when testing Zope 3
filesystem synchronization.

--Guido van Rossum (home page: http://www.python.org/~guido/)