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

All() on Hash should have option to return tuples of the relative key and value rather than just the values. #271

Open
StuartFarmer opened this issue Oct 17, 2019 · 0 comments

Comments

@StuartFarmer
Copy link
Contributor

Either have all spit out the keys on default, or have a method to allow it. Right now, it just spits out the values which is alright, but hard to do anything useful such as filtering, updating over specific sets based on retrieval, etc.

Expected behavior:

balances = Hash()
balances['stu'] = 100
balances['raghu'] = 100
balances['tejas'] = 100

for k, v in balances.all():
    if k == 'tejas':
        balances[k] = 1_000_000
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