We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fab3194 commit 96b7e9bCopy full SHA for 96b7e9b
fastcore/foundation.py
@@ -22,6 +22,7 @@ def copy_func(f):
22
"Copy a non-builtin function (NB `copy.copy` does not work for this)"
23
if not isinstance(f,FunctionType): return copy(f)
24
fn = FunctionType(f.__code__, f.__globals__, f.__name__, f.__defaults__, f.__closure__)
25
+ fn.__kwdefaults__ = f.__kwdefaults__
26
fn.__dict__.update(f.__dict__)
27
return fn
28
0 commit comments