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

Add option for different kinds of storage in .stored_nsvars and .retained_tempvars #20

Open
bskinn opened this issue Oct 6, 2017 · 0 comments

Comments

@bskinn
Copy link
Owner

bskinn commented Oct 6, 2017

Currently it's just an assignment, which means that the contents of any referenced mutables stored in .stored_nsvars will update if those variables are later updated/appended-to.

At a high level, it might be useful to allow callers to specify how they want variables stored in .stored_nsvars among 'assign', 'copy', and 'deepcopy'.

It might also be useful to allow the same selection for .retained_tempvars, since if a mutable is assigned to both a masked and a non-masked variable, a modification to either the surviving non-masked variable or the .retained_tempvars variable will also be reflected in the other variable.

Important: For the most natural behavior, any variables restored to the namespace at __exit__ should probably be the original variables. Thus, if .copy or .deepcopy is indicated, a separate version of the stored nsvars that's constructed using simple assignments should probably be curated.

@bskinn bskinn added this to the Future milestone Oct 6, 2017
@bskinn bskinn added the maybe label Oct 18, 2017
@bskinn bskinn modified the milestones: Future, If Requested Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant