MashedTech@lemmy.world to Programmer Humor@programming.dev · 2 months agoI redid the meme with what hurts melemmy.worldimagemessage-square47fedilinkarrow-up11arrow-down10file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up11arrow-down1imageI redid the meme with what hurts melemmy.worldMashedTech@lemmy.world to Programmer Humor@programming.dev · 2 months agomessage-square47fedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squareJATth@lemmy.worldlinkfedilinkarrow-up0·edit-22 months agoPython is just a pile of dicts/hashtables under the hood. Even the basic int type is actually a dict of method names: x = 1; print(dir(x)) ['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', ... ]
minus-squareRain World: Slugcat Game@lemmy.worldlinkfedilinkarrow-up0·edit-22 months agojs is similar, though it does not include python’s precalculated numbers calculates integers from -5 to 256, see: > a = 100 > b = 100 > c = 1000 > d = 1000 > a is b True > c is d False
Python is just a pile of dicts/hashtables under the hood. Even the basic
int
type is actually a dict of method names:x = 1; print(dir(x)) ['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', ... ]
audible C++ programmer disgust
js is similar, though it does not include python’s precalculated numbers
calculates integers from -5 to 256, see: