GrahamDumpleton / wrapt

A Python module for decorators, wrappers and monkey patching.
BSD 2-Clause "Simplified" License
2.06k stars 231 forks source link

Add documentation for wrapt.when_imported #94

Closed wimglenn closed 7 years ago

wimglenn commented 7 years ago

Hi Graham, thanks for your great work on wrapt. Could you please add some documentation for wrapt.when_imported? I want to do some stuff in a post import hook after numpy is imported, but I was getting errors when trying to use this and I couldn't find any documentation to see how to use it properly. Thanks!

GrahamDumpleton commented 7 years ago

It works per the original PEP 369 proposal at:

Right now is only mentioned in:

Using it alone doesn't solve all the issues though.

Also consider watching my talk about monkey patching at:

and reading:

wimglenn commented 7 years ago

Thanks, I got it working after reading that PEP! I'll close this issue, but you may re-open it if you want to keep a reminder to document the function.