[Python-Dev] the explicit self (original) (raw)
Kilian Klimek kilian.klimek at googlemail.com
Wed Aug 27 08:46:15 CEST 2008
- Previous message: [Python-Dev] Confusing listreverseiterator Behavior
- Next message: [Python-Dev] the explicit self
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
i know this has been discusses very much, i'm sorry, but i can't help it. In a nutshell, the proposal is as follows:
- Self remains explicit (like it is now).
- if a class is a subclass of a special class, e.g. named 'selfless', the self parameter is not required and a special variable, named 'this' is provided.
For example:
class Foo (selfless): def init (x, y): this.x = x ...
A patch for 3.0b3 implementing this can be found at http://www-lehre.inf.uos.de/~kklimek/misc/python_slp_8.diff
regards, Kilian Klimek -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20080827/08e9ac5f/attachment.htm>
- Previous message: [Python-Dev] Confusing listreverseiterator Behavior
- Next message: [Python-Dev] the explicit self
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]