News for hackers. Stuff that matters.
Re:Python-patterns – A collection of design patterns/idioms ... by born2discover on Tuesday May 31, 2022 @02:33PM (#31573093)
IMHO that greeter function of yours is unnecessarily complicated. The same could be achieved in an easier way:

"""python

from functools import partial

def greeter(name):

    print(f"Hello {name}")

greet1 = partial(greeter, "Joe")

greet2 = partial(greeter, "Sue")

greet1()

greet2()

"""

There are no comments on this comment yet.