Daniel Fetchinson wrote:
http://neopythonic.blogspot.com/2008/10/why-explicit-self-has-to-stay.html

The proposal is to allow this:

class C:
    def self.method( arg ):
        self.value = arg
        return self.value

instead of this:

class C:
    def method( self, arg ):
        self.value = arg
        return self.value

I'd like this new way of defining methods, what do you guys think?

Consider the maverick who insists on

class C:
  def me.method(arg):
    self.value = arg

which should be equivalent to

class C:
  def method(me, arg):
    me.value = arg

What's the interpreter going to do with our maverick's code?

James
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to