Albbi@piefed.ca to Programmer Humor@programming.devEnglish · 27 days agoObject oriented programming in Python be like:media.piefed.caimagemessage-square49linkfedilinkarrow-up1487arrow-down112
arrow-up1475arrow-down1imageObject oriented programming in Python be like:media.piefed.caAlbbi@piefed.ca to Programmer Humor@programming.devEnglish · 27 days agomessage-square49linkfedilink
minus-squaretheit8514@lemmy.worldlinkfedilinkarrow-up44·27 days agoOnly if you define it. const that = this
minus-squaremesa@piefed.sociallinkfedilinkEnglisharrow-up15·27 days agoI remember that a long time ago. Oh god
minus-squareAurenkin@sh.itjust.workslinkfedilinkarrow-up7·27 days agoI remember this too… what a nightmare.
minus-squareEager Eagle@lemmy.worldlinkfedilinkEnglisharrow-up30·edit-227 days agoit’s common practice as a workaround to save this when changing contexts, since this may change under you, in callbacks and such
Wait there’s a “that”???
Only if you define it.
const that = this
I remember that a long time ago. Oh god
I remember this too… what a nightmare.
it’s common practice as a workaround to save
this
when changing contexts, sincethis
may change under you, in callbacks and suchKotlin:
this@outerFunction.bla