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

Special case method names in the ContextMap namespaces #2

Open
jsbueno opened this issue Aug 13, 2024 · 0 comments
Open

Special case method names in the ContextMap namespaces #2

jsbueno opened this issue Aug 13, 2024 · 0 comments

Comments

@jsbueno
Copy link
Owner

jsbueno commented Aug 13, 2024

There are no provisions right now to separate the MutableMapping method names (copy, keys, etc...) from context-variable keys - (the current behavior is even undefined, as in "I don't know what would happen if one is to use these keys" .

The suggestion is to separate a reserved attribute list as a class attribute (with the _et_ prefix, which should be reserved anyway) and give some special treatment to those. They colliding names should then just work on ContextMap instances, and maybe error with AttributeError on ContextLocal distances (there are no public methods there yet, but maybe copy_context and run should be reserved for future implementation of the functionality available in contextvars.Context)

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

1 participant