dependencies icon indicating copy to clipboard operation
dependencies copied to clipboard

Explain why classes are better that partial functions.

Open proofit404 opened this issue 3 years ago • 0 comments

def action(a, b):
    def do(c, d):
        return ...
    return doc

versus

class Action:
    a = ...
    b = ...
    def do(self, c, d):
        ...
  • inner function repr vs attrs repr
  • ugly return in the bottom of the line
  • do = partial(action, a, b) mixes configuration and execution arguments in function signature

proofit404 avatar Nov 04 '22 23:11 proofit404