Guido van Rossum wrote: >>>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. Very close is still not good enough :-) I can't really believe that you're designing protocols that have to call unknown factory functions to see whether they do something particular or not. If you really happen to have a need for this, why can't you introduce factory functions which take care of your particular use case ? I don't think it's common enough to risk accidental progamming errors in other user's code. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Jun 13 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2003, Charleroi, Belgium: 11 days left
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4