Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
code_duck
· 15y ago · 0 comments
You can rename self to whatever you want in Python by changing it in the function definition.
class Flip(object): foo=4 def flop(x,num): x.bar=x.foo+num
Comments
[–]
xiongchiamiov
15y ago
Right, but his point was that the self variable is declared in front of the method name, similarly to how it looks when you call said method.