A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-July/046290.html below:

[Python-Dev] Prototypes [was: Proper tail recursion]

[Python-Dev] Prototypes [was: Proper tail recursion] [Python-Dev] Prototypes [was: Proper tail recursion]Raymond Hettinger python at rcn.com
Fri Jul 16 04:43:27 CEST 2004
[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

More information about the Python-Dev mailing list

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