Dynamically created method and decorator, got error 'functools.partial' object has no attribute '__module__'

前端 未结 7 742
面向向阳花
面向向阳花 2020-12-31 01:58

I am currently using EndpointsModel to create a RESTful API for all my models on AppEngine. Since it is RESTful, these api have a lot of repeat code which I want to avoid.

7条回答
  •  天命终不由人
    2020-12-31 02:34

    This issue is fixed as of Python 2.7.11 (not sure which specific release it was fixed in). You can do functools.wraps on a functools.partial object in 2.7.11.

提交回复
热议问题