bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 15 hours agoThe meaning of thislemmy.mlimagemessage-square53fedilinkarrow-up1426
arrow-up1426imageThe meaning of thislemmy.mlbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 15 hours agomessage-square53fedilink
minus-squareWolfLink@sh.itjust.workslinkfedilinkarrow-up31·10 hours agoIn Python, self is not a keyword, it’s a conventional variable name. You can replace all instances of “self” with “this” and your code will work the same.
minus-squarejsomae@lemmy.mllinkfedilinkarrow-up1·1 hour agoLua might have been a better choice, since self is special in lua.
minus-squareSkyNTP@lemmy.mllinkfedilinkarrow-up7·9 hours agoPython is just distancing itself from JS.
In Python, self is not a keyword, it’s a conventional variable name. You can replace all instances of “self” with “this” and your code will work the same.
Lua might have been a better choice, since
self
is special in lua.Python is just distancing itself from JS.