bterwijn@programming.dev to Python@programming.devEnglish · 29 days agoDifference between 'instance', 'class', and 'static' method visually explainedprogramming.devimagemessage-square5linkfedilinkarrow-up126arrow-down11file-text
arrow-up125arrow-down1imageDifference between 'instance', 'class', and 'static' method visually explainedprogramming.devbterwijn@programming.dev to Python@programming.devEnglish · 29 days agomessage-square5linkfedilinkfile-text
The difference in Python OOP between: instance method class method static method visually explained using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵:
minus-squareaionlinkfedilinkarrow-up2·29 days agoJust don’t use double underscores in C++, identifiers containing double underscores are reserved for the compiler/linker/standard library.
minus-squarebterwijn@programming.devOPlinkfedilinkarrow-up1·29 days agoSame thing in Python, double underscore prefix triggers “name mangling”. There are issues that can pop up when using it if not aware.
Just don’t use double underscores in C++, identifiers containing double underscores are reserved for the compiler/linker/standard library.
Same thing in Python, double underscore prefix triggers “name mangling”. There are issues that can pop up when using it if not aware.