A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2007-January/070513.html below:

[Python-Dev] features i'd like [Python 3000] ... #3: fix super()

[Python-Dev] features i'd like [Python 3000] ... #3: fix super() [Python-Dev] features i'd like [Python 3000] ... #3: fix super()Eduardo "EdCrypt" O. Padoan eopadoan at altavix.com
Sat Jan 6 18:16:19 CET 2007
> I was bitten by the urge to play with this today, and modified my
> previous "self" hack to handle "super" also, so that the following
> code works:
>
>      class D (C):
>          @method
>          def sum(n):
>              return super.sum(n * 2) - self.base
>
> Posted as "evil2.py" here:
>
>      http://www.lag.net/robey/code/surf/
>
> Because hacking "super" requires having the class object handy, this
> one needs a metaclass to do its magic, which is a shame.  I guess if
> it was implemented inside the cpython compiler, it would be less of a
> problem.

BTW, a "super-only" version of this decortor (that I think could be
called "implement") has  some more chances in Python. But think
belongs more to Python-Ideas list, ok?

-- 
EduardoOPadoan (eopadoan->altavix::com)
Bookmarks: http://del.icio.us/edcrypt
Blog: http://edcrypt.blogspot.com
Jabber: edcrypt at jabber dot org
ICQ: 161480283
GTalk: eduardo dot padoan at gmail dot com
MSN: eopadoan at altavix dot com
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