Guido van Rossum wrote: > We could also consider this a general weakness of the "alternative > constructors are class methods" pattern. If instead these alternative > constructors were folded into the main constructor (e.g. via special > keyword args) it would be altogether clearer what a subclass should do. A useful guideline might be that class methods can be provided as sugar for alternative constructors, but they should all funnel through the main constructor. There's a convention like this in the Objective-C world where one of an object's "init" methods is supposed to be documented as the "designated initialiser", so that there is just one thing that subclasses need to override. -- Greg
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