为什么 python 模块 dill 不能 pickle 生成器函数?

Why can't python module dill pickle the generator function?

Dill 模块很棒,它可以 pickle 整个 python 解释器全局状态。但是 Dill 不能腌制发电机。我知道它不受支持。但我想知道它可以 pickle python 函数的技术原因?

dill 的问题跟踪器 issue #10 (pickle iterators), which says that it's not easily done--for reference it points both to an existing Stack Overflow answer and to Python's issue tracker, particularly to an enhancement request titled Make Generators Pickle-able 中对此进行了介绍,但已被拒绝。