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

pick() should work with lists #20

Closed
dgilland opened this issue Jul 30, 2014 · 0 comments
Closed

pick() should work with lists #20

dgilland opened this issue Jul 30, 2014 · 0 comments
Milestone

Comments

@dgilland
Copy link
Owner

In Lo-Dash:

_.pick([1, 2, 3], 0) == {'0': 1}

In pydash:

pydash.pick([1,2,3], 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pydash/objects.py", line 322, in pick
    return dict((key, value) for key, value in iteritems(obj)
  File "pydash/_compat.py", line 38, in <lambda>
    iteritems = lambda d: d.iteritems()
AttributeError: 'list' object has no attribute 'iteritems'

NOTE: Even though Lo-Dash returns string keys, pydash should use integers.

@dgilland dgilland added this to the v1.0.0 milestone Jul 30, 2014
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