Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we add an explicit funcopy function ? #88

Open
smarie opened this issue Sep 7, 2022 · 2 comments
Open

Should we add an explicit funcopy function ? #88

smarie opened this issue Sep 7, 2022 · 2 comments

Comments

@smarie
Copy link
Owner

smarie commented Sep 7, 2022

def funcopy(f):
    """Creates an actual copy of a function, since python copy() does not"""
    return partial(f)
@makslevental
Copy link

Just curious: what does copy.deepcopy do that I'm missing that precludes it from being a "true" copy?

@smarie
Copy link
Owner Author

smarie commented Jul 12, 2024

Thanks @makslevental !

See discussions here :

I did not follow all of this so not sure this is still needed / relevant. This original issue was a way for me to remember the (odd but existing) practice of copying a function using partial, and remembering that maybe there was an actual need.

Would need some digging to confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants