Dmitry Vasiliev wrote: > Is it a good time to consider the entrie tree of ALL types then? Please, no. One of the best things about Python is that, for most purposes, you can get the appropriate reaction from the standard library simply by providing the relevant magic methods (e.g. __iter__ if you want to be treated like a sequence). Normal class inheritance means you are inheriting the *whole* interface, as well as the implementation of any parts you don't override. So 'sequence' for instance, couldn't have any methods or do much of anything, without causing potentially undesirable behaviour. About the only exception that makes any sense to me is for exceptions, where using inheritance for classification seems to be universal practice in all languages with exceptions (since 'catch X' generally means catch X, or any of its subclasses). (Bad pun noted, and not avoided). Localised type hierarchies where it is useful, OK. Inheriting from object as a way to say 'new-style class please', OK. But please, please, please, lets keep interface introspection the dominant way of determining what can be done with a particular object. Creating a 'grand hierarchy of everything' runs directly counter to that goal. Regards, Nick. -- Nick Coghlan | Eugene, Oregon Email: ncoghlan at email.com | USA
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