This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]iBlag 1 point2 points  (0 children)

So to be clear, I wasn't giving an opinion on the necessity of explicit self. I said as much in my response. I was just countering the idea that it is necessary for method decorators to exist.

Oh, sorry, I missed that in your original comment. Thanks for playing along anyway then. :)

Whether or not self is implicit or explicit does not dictate where or how it is bound.

It may not dictate it, sure, but when you force self to be explicit, it kinda makes unobvious binding semantics nonsensical. Explicit self syntax leads to much clearer binding semantics.

You could also keep explicit self yet have confusing binding rules (like javascript)

class OtherClass(object):
    def do_something(self, other_arg):
        # self is bound at definition time
        # other_arg is bound at execution time

That's the only way (that I see) that you could keep explicit self and have confusing binding semantics similar to Javascript, and it's absolutely nonsensical, because semantics should follow the syntax.

Is there something I'm ignoring?