MoreCoffee to Python@programming.devEnglish · 2 years agoDesigning Pythonic library APIsbenhoyt.comexternal-linkmessage-square2fedilinkarrow-up15arrow-down10
arrow-up15arrow-down1external-linkDesigning Pythonic library APIsbenhoyt.comMoreCoffee to Python@programming.devEnglish · 2 years agomessage-square2fedilink
minus-squarekronicmage@lemmy.calinkfedilinkEnglisharrow-up1·2 years agoObjects are just the poor man’s closures. I really hate it when libraries like urllib impose a multi-class object nesting paradigm when a simple multi argument function would be better in every way
minus-squareBaldur Nil@programming.devlinkfedilinkEnglisharrow-up2·2 years agoYeah but sometimes you want something that has mutable state over time, and it’s easier to pack it into a self-contained thing.
Objects are just the poor man’s closures. I really hate it when libraries like urllib impose a multi-class object nesting paradigm when a simple multi argument function would be better in every way
Yeah but sometimes you want something that has mutable state over time, and it’s easier to pack it into a self-contained thing.