Minor cleanup of the README file.

This commit is contained in:
Simon Forman
2018-04-22 09:16:48 -07:00
parent 669c86cbf1
commit 7c80a22851
2 changed files with 73 additions and 61 deletions
+5 -2
View File
@@ -56,8 +56,11 @@ function name! Hopefully they will discover this documentation.
def rename_code_object(new_name):
'''
If you want to wrap a function in another function and have the wrapped
function's name show up in the traceback, you must do this brutal
hackery to change the func.__code__.co_name attribute. See:
function's name show up in the traceback when an exception occurs in
the wrapper function, you must do this brutal hackery to change the
func.__code__.co_name attribute. Just functools.wraps() is not enough.
See:
https://stackoverflow.com/questions/29919804/function-decorated-using-functools-wraps-raises-typeerror-with-the-name-of-the-w