PythOnRails@programming.dev to Python@programming.dev · 1 year agoThe Python dictionary dispatch patternjamesg.blogexternal-linkmessage-square10fedilinkarrow-up133cross-posted to: hackernews@derp.foo
arrow-up133external-linkThe Python dictionary dispatch patternjamesg.blogPythOnRails@programming.dev to Python@programming.dev · 1 year agomessage-square10fedilinkcross-posted to: hackernews@derp.foo
minus-squareZeth0s@lemmy.worldlinkfedilinkarrow-up1·1 year agoWith classes you needs getattr in python to achieve the same. This is cleaner for simple mappings
With classes you needs getattr in python to achieve the same. This is cleaner for simple mappings