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

Cannot create weak reference to NamedTuple #672

Closed
Qu4tro opened this issue Aug 23, 2019 · 2 comments
Closed

Cannot create weak reference to NamedTuple #672

Qu4tro opened this issue Aug 23, 2019 · 2 comments

Comments

@Qu4tro
Copy link

Qu4tro commented Aug 23, 2019

Hey there.

I'm creating this issue in the follow up of pydanny/cached-property#168 and pydanny/cached-property#137

As @althonos mentioned, NamedTuple doesn't have a __weakref__ slot. My question is here, if there's any implementation detail that prohibits NamedTuple to have it or if it's just missing.

You can use this repo as an example:
https://github.com/Qu4tro/cachedproperty_immutable_classes/

Thanks in advance.

@ilevkivskyi
Copy link
Member

This is kind of intentional, please read this email https://mail.python.org/pipermail/python-list/2005-March/346300.html

If it is not convincing, then open an issue on https://bugs.python.org and add Raymond Hettinger to nosy list.

@Qu4tro
Copy link
Author

Qu4tro commented Aug 23, 2019

Thanks, that was the answer I was looking for.

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