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

Dictionary keys can be forzenset #14

Open
Agent-Hellboy opened this issue Jan 18, 2023 · 1 comment
Open

Dictionary keys can be forzenset #14

Agent-Hellboy opened this issue Jan 18, 2023 · 1 comment
Labels
enhancement New feature or request hacktoberfest

Comments

@Agent-Hellboy
Copy link
Owner

>>> l = ["Geeks", "for", "Geeks"]
>>> s=frozenset(l) 
>>> s
frozenset({'for', 'Geeks'})
>>> dict={1:'a',2:{s:'frozenset'}}
>>> from trace_dkey import trace
>>> trace(dict,p)
[]

this should return [2,s]
but this is very tricky as frozenset are ast.Call object [<ast.Call object at 0x7fafe8919d90>]

@Agent-Hellboy Agent-Hellboy added the enhancement New feature or request label Jan 18, 2023
@sagarhande
Copy link

I think you have used the undeclared variable p in the last statement
>>> trace(dict,p)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants