Hi, Greg Ewing: [...] > How about spelling super(self, MyBaseClass) as > > MyBaseClass[self] > > This can be thought of as a sort of "cast" which turns self > into an object which behaves like it were an instance of > MyBaseClass. Then we can write > > MyBaseClass[self].foo(args) > > Advantages: > * Concise and uncluttered > * No new syntax needed > * Can be implemented using existing mechanisms > * Doesn't even remotely resemble anything in C++ :-) Disadvantages: * People will confuse this with calling MyBaseClass.__getitem__(....) * Doesn't even remotely resemble anything in C++ We have to face it: I myself don't like C++ either, but a *lot* of people today are already familar with C++ today. Giving them something they are already familar with, will make it easier to convert some of them to Python. To Greg: This '::' operator is not at all that ugly and AFAI can see would not introduce any backward incompatible change to the language. I'm sure C++ has some other real warts to offer that we both don't want to see in a future version of Python. Right? Regards, Peter -- Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany, Fax:+49 4222950260 office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen, Germany)
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