Self Is Just a Name

class Box:
    def __init__(this, value):
        this.value = value

    def show(banana):
        return banana.value

b = Box(42)
print(b.show())

What happens when this runs?

A

It prints None, because without self the instance is never bound and this.value silently sets a class attribute instead.

B

It prints 42. self is only a convention; the first positional parameter of an instance method receives the calling instance regardless of what it is named.

C

It raises a TypeError, because __init__ and show do not use the parameter name self.

D

It raises a NameError inside show, because banana was never declared as referring to the instance.