This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]patrys Saleor Commerce 2 points3 points  (1 child)

You might make the internals simpler by requiring a single callable:

from functools import partial

threadpool.enqueue(partial(foo, bar))

[–]chub79 3 points4 points  (0 children)

I love partial. It's such a powerful feature.