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

no replacement for deep_pluck with list argument #92

Closed
fnep opened this issue Apr 4, 2017 · 1 comment
Closed

no replacement for deep_pluck with list argument #92

fnep opened this issue Apr 4, 2017 · 1 comment

Comments

@fnep
Copy link
Contributor

fnep commented Apr 4, 2017

With the upgrade to version 4, there seems to be no equal replacement for deep_pluck with a list as argument.The recommended .map call has a different behavior.

Version 3.4.8:

>>> py_.deep_pluck([{1: {2: {3: 4}}}], [1, 2])
[{3: 4}]

Version 4.0.0:

>>> py_.map([{1: {2: {3: 4}}}], [1, 2])
[False]

The only workaround i found was:

>>> py_.map([{1: {2: {3: 4}}}], py_.property_deep([1, 2]))
[{3: 4}]
@dgilland
Copy link
Owner

dgilland commented Apr 4, 2017

You're right. map_ doesn't support the same functionality as deep_pluck did (which was an oversight on my part).

I've brought the functionality of deep_pluck back in 4.0.1 but renamed it to pluck: https://pypi.python.org/pypi/pydash/4.0.1

As another consequence, I've also removed property_deep and made property_ work like property_deep did.

@dgilland dgilland closed this as completed Apr 4, 2017
dgilland pushed a commit that referenced this issue Apr 6, 2017
This is to foresee #92 in the future via doctests.
dgilland pushed a commit that referenced this issue Nov 17, 2017
* add example for intersection of a single list

This is to foresee #92 in the future via doctests.

* add function to wrap single items in a list

* move listify functionality into to_list

#107

* rename to_list parameter and always return a copy of the list

#107

* return strings as separate chars in to_list

#107

* add option not to split strings to chars in to_list

Also ensure bytes typed object handling is the same with python3 as with python2.

#107
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