Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPythonMultiprocessing vs threading / picklingSingle-choice MCQ

Why does attempting to send the function g (returned by make) to a worker process via pickle fail, while a plain top-level function succeeds?

def make(): y = 10 def g(): return y return g import pickle pickle.dumps(make()) # ???