[Raymond]: > > > helping out people who want to experiment with prototype OO. The > > > request is make it possible to write: > > > > > > def Account.deposit(self, v): > > > self.balance += v [Barry] > I've wanted this for a long time, but I don't think Guido's ever been in > favor of this. Every now and then he gives a little gift if it makes us happy, benefits a class of users, and doesn't muck up anything else. [AMK] > > Could function decorators be used for this? [Barry] > Possibly so, and that's kind of neat. Perhaps, but why make something hard out of something simple. Regular assignments show that no special magic is required: acct.bal = 0. The def statement could benefit from the same courtesy. Raymond
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