- Fix bug in
zip_object
andzip_object_deep
where an empty list for keys/values would cause an exception instead of returning an empty dict.
- Specify explicit type parameters for all type annotations. Thanks DeviousStoat!
- Fix typing issue in
map_
for compatability withchain
. Thanks DeviousStoat!
- Fix issue where too many arguments were passed to stdlib's
operator.attrgetter
,operator.itemgetter
, andoperator.methodcaller
when instances of those classes were used as callbacks to functions likemap_
,filter_
, etc. due to a bug introduced in Python 3.12.3 and 3.11.9 that reported an incorrect signature for thoseoperator
class instances.
- Add functions (Thanks DeviousStoat!):
apply
(previously namedthru
)apply_catch
apply_if
apply_if_not_none
eq_cmp
gt_cmp
gte_cmp
in_range_cmp
is_equal_cmp
is_equal_with_cmp
is_instance_of_cmp
is_match_cmp
is_match_with_cmp
is_monotone_cmp
lt_cmp
lte_cmp
- Rename function
thru
toapply
. Thanks DeviousStoat! (breaking change) - Changed
zip_
,unzip
,zip_with
,unzip_with
andto_pairs
to accept iterables of tuples instead of lists and return lists of tuples instead of lists of lists. Thanks DeviousStoat! (breaking change) - Fixed bug in
divide
,multiply
, andsubtract
that returned the wrong result when0
was used as one of the operation values. Thanks DeviousStoat!
- Fix bug in function wrappers that incorrectly computed the number of arguments the wrapped function could handle. Thanks DeviousStoat!
- Fix bug in
set_
where the incorrect object type, list instead of dict, was initialized on class attributes. Thanks DeviousStoat! - Drop support for Python 3.7.
- Fix typing for chaining interface for methods that use varargs. Thanks DeviousStoat!
- Fix typing for
find_index
andfind_last_index
by allowingpredicate
argument to be callback shorthand values. Thanks DeviousStoat!
- Exclude incompatible
typing-extensions
version4.6.0
from install requirements. Incompatibility was fixed in4.6.1
.
- Fix typing for
difference_by
,intersection_by
,union_by
,uniq_by
, andxor_by
by allowingiteratee
argument to be Any. Thanks DeviousStoat!
- Fix issue where using
pyright
as a type checker withreportPrivateUsage=true
would report errors that objects are not exported frompydash
. Thanks DeviousStoat!
- Fix missing install dependency,
typing-extensions
, for package.
- Add type annotations to package. Raise an issue for any typing issues at https://github.com/dgilland/pydash/issues. Thanks DeviousStoat! (breaking change)
- Change behavior of
to_dict
to not usingdict()
internally. Previous behavior would be for something liketo_dict([["k", "v"], ["x", "y"]])
to return{"k": "v", "x": "y"}
(equivalent to callingdict(...)
) butto_dict([["k"], ["v"], ["x"], ["y"]])
would return{0: ["x"], 1: ["v"], 2: ["x"], 3: ["y"]}
. The new behavior is to always return iterables as dictionaries with their indexes as keys like{0: ["k", "v"], 1: ["x", "y"]}
. This is consistent with how iterable objects are iterated over and means thatto_dict
will have more reliable output. (breaking change) - Change behavior of
slugify
to remove single-quotes from output. Instead ofslugify("the cat's meow") == "the-cat's-meow"
, the new behavior is to return"the-cats-meow"
. (breaking change) - Add support for negative indexes in
get
path keys. Thanks bl4ckst0ne!
- Only prevent access to object paths containing
__globals__
or__builtins__
instead of all dunder-methods for non-dict/list objects.
- Fix exception raised due to mishandling of non-string keys in functions like
get()
for non-dict/list objects that used integer index references like"[0]"
.
- Prevent access to object paths containing dunder-methods in functions like
get()
for non-dict/list objects. Attempting to access dunder-methods using get-path keys will raise aKeyError
(e.g.get(SomeClass(), '__init__'
will raise). Access to dict keys are unaffected (e.g.get({"__init__": True}, "__init__")
will returnTrue
). (breaking change) - Add support for Python 3.11.
- Drop support for Python 3.6 (breaking change)
- Remove unnecessary type check and conversion for
exceptions
argument inpydash.retry
.
- Add support for Python 3.10.
- Fix timing assertion issue in test for
pydash.delay
where it could fail on certain environments.
- Support matches-style callbacks on non-dictionary objects that are compatible with
pydash.get
in functions likepydash.find
.
- Fix compatibility issue between
pydash.py_
/pydash._
andtyping.Protocol
+typing.runtime_checkable
that caused an exception to be raised forisinstance(py_, SomeRuntimeCheckableProtocol)
.
- Fix bug in
merge_with
that prevented custom iteratee from being used when recursively merging. Thanks weineel!
- Drop support for Python 2.7. (breaking change)
- Improve Unicode word splitting in string functions to be inline with Lodash. Thanks mervynlee94! (breaking change)
camel_case
human_case
kebab_case
lower_case
pascal_case
separator_case
slugify
snake_case
start_case
upper_case
- Optimize regular expression constants used in
pydash.strings
by pre-compiling them to regular expression pattern objects.
- Fix regression introduced in
v4.8.0
that causedmerge
andmerge_with
to raise an exception when passingNone
as the first argument.
- Fix regression introduced in
v4.9.1
that brokepydash.get
for dictionaries and dot-delimited keys that reference integer dict-keys.
- Fix bug in
get/has
that causeddefaultdict
objects to get populated on key access.
- Add
default_to_any
. Thanks gonzalonaveira! - Fix mishandling of key names containing
\.
inset_
,set_with
, andupdate_with
where the.
was not treated as a literal value within the key name. Thanks zhaowb!
- Support attribute based setters like
argparse.Namespace
inset_
,set_with
,update
, andupdate_with
. - Fix exception in
order_by
whenNone
used as a sort key. Thanks elijose55! - Fix behavior of
pick_by
to return the passed in argument when only one argument given. Previously, an empty dictionary was returned. Thanks elijose55! - Officially support Python 3.8.
- Fix handling of
Sequence
,Mapping
, andnamedtuple
types inget
so that their attributes aren't accessed during look-up. Thanks jwilson8767!
- Fix handling of string and byte values in
clone_with
andclone_deep_with
when a customizer is used. - Fix handling of non-indexable iterables in
find
andfind_last
.
- Raise an explicit exception in
set_
,set_with
,update
, andupdate_with
when an object cannot be updated due to that object or one of its nested objects not being subscriptable.
- Fix bug in
spread
where arguments were not being passed to wrapped function properly.
- Modify
to_dict
to first try to convert usingdict()
before falling back to usingpydash.helpers.iterator()
.
- Internal code optimizations.
- Support Python 3.7.
- Improve performance of the following functions for large datasets:
duplicates
sorted_uniq
sorted_uniq_by
union
union_by
union_with
uniq
uniq_by
uniq_with
xor
xor_by
xor_with
- Add
jitter
argument toretry
.
- Add
attempt
argument toon_exception
callback inretry
. New function signature ison_exception(exc, attempt)
(previously wason_exception(exc)
). All arguments toon_exception
callback are now optional.
- Add
retry
decorator that will retry a function multiple times if the function raises an exception.
- Fix regression in
v4.3.2
introduced by the support added for callable class callbacks that changed the handling of callbacks that could not be inspected. Prior tov4.3.2
, these callbacks would default to being passed a single callback argument, but withv4.3.2
these callbacks would be passed the full set of callback arguments which could result an exception being raised due to the callback not supporting that many arguments.
- Fix issue in
defaults_deep
where sources with non-dict values would raise an exception due to assumption that object was always a dict. - Fix issue in
curry
where too many arguments would be passed to the curried function when evaluating function if too many arguments used in last function call. - Workaround issue in Python 2.7 where callable classes used as callbacks were always passed the full count of arguments even when the callable class only accept a subset of arguments.
- Fix
set_with
so that callable values are not called when being set. This bug also impacted the following functions by proxy:pick
pick_by
set_
transpose
zip_object_deep
- Add
nest
. - Wrap non-iterables in a list in
to_list
instead of raising an exception. Thanks efenka! - Add
split_strings
argument toto_list
to control whether strings are coverted to a list (split_strings=True
) or wrapped in a list (split_strings=False
). Default issplit_strings=True
. Thanks efenka!
- Ensure that
to_path
always returns alist
. - Fix
get
to work with path values other than just strings, integers, and lists.
- Support more iterator "hooks" in
to_dict
so non-iterators that expose anitems()
,iteritems()
, or has__dict__
attributes will be converted using those methods. - Support deep paths in
omit
andomit_by
. Thanks beck3905! - Support deep paths in
pick
andpick_by
. Thanks beck3905!
- Fix missing argument passing to matched function in
cond
. - Support passing a single list of pairs in
cond
instead of just pairs as separate arguments.
- Officially support Python 3.6.
- Add
properties
function that returns list of path values for an object. - Add
replace_end
. - Add
replace_start
. - Make
iteratee
supportproperties
-style callback when atuple
is passed. - Make
replace
acceptfrom_start
andfrom_end
arguments to limit replacement to start and/or end of string.
- None
- None
- Improve performance of
get
. Thanks shaunpatterson!
- None
- Fix regression in
get
wherelist
anddict
objects had attributes returned when a key was missing but the key corresponded to an attribute name. For example,pydash.get({}, 'update')
would return{}.update()
instead ofNone
. Previous behavior was that only item-access was allowed forlist
anddict
which has been restored. - Fix regression in
invoke
/invoke_map
where non-attributes could be invoked. For example,pydash.invoke({'items': lambda: 1}, 'items')
would return1
instead ofdict_items([('a', 'items')])
. Previous behavior was that only attribute methods could be invoked which has now been restored.
- None
- Fix regression in
intersection
,intersection_by
, andintersection_with
introduced inv4.0.0
where the a single argument supplied to intersection should return the same argument value instead of an empty list.
- None
- Make
property_
work with deep path strings.
- Revert removal of
deep_pluck
and rename topluck
. Previously,deep_pluck
was removed andmap_
was recommended as a replacement. However,deep_pluck
(now defined aspluck
) functionality is not supported bymap_
so the removalpluck
was reverted.
- Remove
property_deep
(useproperty_
).
- Add
assign_with
. - Add
clamp
. - Add
clone_deep_with
. - Add
clone_with
. - Add
cond
. Thanks bharadwajyarlagadda! - Add
conforms
. - Add
conforms_to
. - Add
default_to
. Thanks bharadwajyarlagadda! - Add
difference_by
. - Add
difference_with
. - Add
divide
. Thanks bharadwajyarlagadda! - Add
eq
. Thanks bharadwajyarlagadda! - Add
flat_map
. - Add
flat_map_deep
. - Add
flat_map_depth
. - Add
flatten_depth
. - Add
flip
. Thanks bharadwajyarlagadda! - Add
from_pairs
. Thanks bharadwajyarlagadda! - Add
intersection_by
. - Add
intersection_with
. - Add
invert_by
. - Add
invoke_map
. - Add
is_equal_with
. Thanks bharadwajyarlagadda! - Add
is_match_with
. - Add
is_set
. Thanks bharadwajyarlagadda! - Add
lower_case
. Thanks bharadwajyarlagadda! - Add
lower_first
. Thanks bharadwajyarlagadda! - Add
max_by
. - Add
mean_by
. - Add
merge_with
. - Add
min_by
. - Add
multiply
. Thanks bharadwajyarlagadda! - Add
nth
. Thanks bharadwajyarlagadda! - Add
nth_arg
. Thanks bharadwajyarlagadda! - Add
omit_by
. - Add
over
. Thanks bharadwajyarlagadda! - Add
over_every
. Thanks bharadwajyarlagadda! - Add
over_some
. Thanks bharadwajyarlagadda! - Add
pick_by
. - Add
pull_all
. Thanks bharadwajyarlagadda! - Add
pull_all_by
. - Add
pull_all_with
. - Add
range_right
. Thanks bharadwajyarlagadda! - Add
sample_size
. Thanks bharadwajyarlagadda! - Add
set_with
. - Add
sorted_index_by
. - Add
sorted_index_of
. Thanks bharadwajyarlagadda! - Add
sorted_last_index_by
. - Add
sorted_last_index_of
. - Add
sorted_uniq
. Thanks bharadwajyarlagadda! - Add
sorted_uniq_by
. - Add
stub_list
. Thanks bharadwajyarlagadda! - Add
stub_dict
. Thanks bharadwajyarlagadda! - Add
stub_false
. Thanks bharadwajyarlagadda! - Add
stub_string
. Thanks bharadwajyarlagadda! - Add
stub_true
. Thanks bharadwajyarlagadda! - Add
subtract
. Thanks bharadwajyarlagadda! - Add
sum_by
. - Add
to_integer
. - Add
to_lower
. Thanks bharadwajyarlagadda! - Add
to_path
. Thanks bharadwajyarlagadda! - Add
to_upper
. Thanks bharadwajyarlagadda! - Add
unary
. - Add
union_by
. Thanks bharadwajyarlagadda! - Add
union_with
. Thanks bharadwajyarlagadda! - Add
uniq_by
. - Add
uniq_with
. - Add
unset
. - Add
update
. - Add
update_with
. - Add
upper_case
. Thanks bharadwajyarlagadda! - Add
upper_first
. Thanks bharadwajyarlagadda! - Add
xor_by
. - Add
xor_with
. - Add
zip_object_deep
. - Make function returned by
constant
ignore extra arguments when called. - Make
get
support attribute access within path. - Make
iteratee
treat an integer argument as a string path (i.e.iteratee(1)
is equivalent toiteratee('1')
for creating a path accessor function). - Make
intersection
work with unhashable types. - Make
range_
support decrementing whenstart
argument is greater thanstop
argument. - Make
xor
maintain sort order of supplied arguments.
- Fix
find_last_key
so that it iterates over object in reverse.
- Make
add
only support two argument addition. (breaking change) - Make
difference
return duplicate values from first argument and maintain sort order. (breaking change) - Make
invoke
work on objects instead of collections. Useinvoke_map
for collections. (breaking change) - Make
set_
support mixedlist
/dict
defaults within a single object based on whether key or index path substrings used. (breaking change) - Make
set_
modify object in place. (breaking change) - Only use
merge
callback result if result is notNone
. Previously, result from callback (if provided) was used unconditionally. (breaking change) - Remove functions: (breaking change)
deep_pluck
(no alternative) [UPDATE:deep_pluck
functionality restored aspluck
inv4.0.1
]mapiter
(no alternative)pluck
(usemap_
)update_path
(useupdate
orupdate_with
)set_path
(useset_
orset_with
)
- Remove aliases: (breaking change)
all_
(useevery
)any_
(usesome
)append
(usepush
)average
andavg
(usemean
ormean_by
)callback
(useiteratee
)cat
(useconcat
)collect
(usemap_
)contains
(useincludes
)curve
(useround_
)deep_get
andget_path
(useget
)deep_has
andhas_path
(usehas
)deep_prop
(useproperty_deep
)deep_set
(useset_
)detect
andfind_where
(usefind
)each
(usefor_each
)each_right
(usefor_each_right
)escape_re
(useescape_reg_exp
)explode
(usesplit
)extend
(useassign
)first
(usehead
)foldl
(usereduce
)foldr
(usereduce_right
)for_own
(usefor_each
)for_own_right
(usefor_each_right
)implode
(usejoin
)is_bool
(useis_boolean
)is_int
(useis_integer
)is_native
(useis_builtin
)is_num
(useis_number
)is_plain_object
(useis_dict
)is_re
(useis_reg_exp
)js_match
(usereg_exp_js_match
)js_replace
(usereg_exp_js_replace
)keys_in
(usekeys
)moving_average
andmoving_avg
(usemoving_mean
)object_
(usezip_object
)pad_left
(usepad_start
)pad_right
(usepad_end
)pipe
(useflow
)pipe_right
andcompose
(useflow_right
)prop
(useproperty_
)prop_of
(useproperty_of
)pow_
(usepower
)re_replace
(usereg_exp_replace
)rest
(usetail
)select
(usefilter_
)sigma
(usestd_deviation
)sort_by_all
andsort_by_order
(useorder_by
)trim_left
(usetrim_start
)trim_right
(usetrim_right
)trunc
(usetruncate
)underscore_case
(usesnake_case
)unique
(useuniq
)values_in
(usevalues
)where
(usefilter_
)
- Rename functions: (breaking change)
deep_map_values
tomap_values_deep
deep_property
toproperty_deep
include
toincludes
index_by
tokey_by
mod_args
toover_args
moving_average
tomoving_mean
pairs
toto_pairs
- Remove
callback
argument from: (breaking change)assign
. Moved toassign_with
.clone
andclone_deep
. Moved toclone_with
andclone_deep_with
.is_match
. Moved tois_match_with
.max_
andmin_
. Moved tomax_by
andmin_by
.omit
. Moved toomit_by
.pick
. Moved topick_by
.sorted_index
. Moved tosorted_index_by
.sum_
. Moved tosum_by
.uniq
/unique
. Moved touniq_by
.
- Renamed
callback
argument topredicate
: (breaking change)drop_right_while
drop_while
every
filter_
find
find_key
find_last
find_index
find_last_index
find_last_key
partition
reject
remove
some
take_right_while
take_while
- Renamed
callback
argument toiteratee
: (breaking change)count_by
duplicates
for_each
for_each_right
for_in
for_in_right
group_by
key_by
map_
map_keys
map_values
map_values_deep
mapcat
median
reduce_
reduce_right
reductions
reductions_right
sort_by
times
transform
unzip_with
zip_with
zscore
- Rename
comparison
argument insort
tocomparator
. - Rename
index
andhow_many
arguments insplice
tostart
andcount
. - Remove
multivalue
argument frominvert
. Feature moved toinvert_by
. (breaking change)
- Make internal function inspection methods work with Python 3 annotations. Thanks tgriesser!
- Fix bug in
get
where an iterable default was iterated over instead of being returned when an object path wasn't found. Thanks urbnjamesmi1!
- Fix bug in
get
where casting a string key to integer resulted in an uncaught exception instead of the default value being returned instead. Thanks urbnjamesmi1!
- Add optional
default
parameter tomin_
andmax_
functions that is used when provided iterable is empty. - Fix bug in
is_match
where comparison between an emptysource
argument returnedNone
instead ofTrue
.
- Shallow copy each source in
assign
/extend
instead of deep copying. - Call
copy.deepcopy
inmerge
instead of the more resource intensiveclone_deep
.
- Fix minor issue in deep path string parsing so that list indexing in paths can be specified as
foo[0][1].bar
instead offoo.[0].[1].bar
. Both formats are now supported.
- Fix bug in
start_case
where capitalized characters after the first character of a word where mistakenly cast to lower case.
- Fix Python 3.5, inspect, and pytest compatibility issue with
py_
chaining object when doctest run onpydash.__init__.py
.
- Optimize callback system for performance.
- Explicitly store arg count on callback for
pydash
generated callbacks where the arg count is known. This avoids the costlyinspect.getargspec
call. - Eliminate usage of costly
guess_builtin_argcount
which parsed docstrings, and instead only ever pass a single argument to a builtin callback function.
- Explicitly store arg count on callback for
- Optimize
get
/set
so that regex parsing is only done when special characters are contained in the path key whereas before, all string paths were parsed. - Optimize
is_builtin
by checking forBuiltinFunctionType
instance and then usingdict
look up table instead of alist
look up. - Optimize
is_match
by replacing call tohas
with atry/except
block. - Optimize
push
/append
by using a native loop instead of callback mapping.
- Add
ceil
. - Add
defaults_deep
. - Add
floor
. - Add
get
. - Add
gt
. - Add
gte
. - Add
is_iterable
. - Add
lt
. - Add
lte
. - Add
map_keys
. - Add
method
. - Add
method_of
. - Add
mod_args
. - Add
set_
. - Add
unzip_with
. - Add
zip_with
. - Make
add
support adding two numbers if passed in positionally. - Make
get
main definition andget_path
its alias. - Make
set_
main definition anddeep_set
its alias.
- Catch
AttributeError
inhelpers.get_item
and return default value if set.
- Fix bug in
reduce_right
where collection was not reversed correctly.
- Add
sort_by_order
as alias ofsort_by_all
. - Fix
is_match
to not compareobj
andsource
types usingtype
and instead useisinstance
comparisons exclusively. - Make
sort_by_all
accept anorders
argument for specifying the sort order of each key via booleanTrue
(for ascending) andFalse
(for descending). - Make
words
accept apattern
argument to override the default regex used for splitting words. - Make
words
handle single character words better.
- Add
fill
. - Add
in_range
. - Add
matches_property
. - Add
spread
. - Add
start_case
. - Make callbacks support
matches_property
style as[key, value]
or(key, value)
. - Make callbacks support shallow
property
style callbacks as[key]
or(key,)
.
- Add
ary
. - Add
chars
. - Add
chop
. - Add
chop_right
. - Add
clean
. - Add
commit
method tochain
that returns a new chain with the computedchain.value()
as the initial value of the chain. - Add
count_substr
. - Add
decapitalize
. - Add
duplicates
. - Add
has_substr
. - Add
human_case
. - Add
insert_substr
. - Add
is_blank
. - Add
is_bool
as alias ofis_boolean
. - Add
is_builtin
,is_native
. - Add
is_dict
as alias ofis_plain_object
. - Add
is_int
as alias ofis_integer
. - Add
is_match
. - Add
is_num
as alias ofis_number
. - Add
is_tuple
. - Add
join
as alias ofimplode
. - Add
lines
. - Add
number_format
. - Add
pascal_case
. - Add
plant
method tochain
that returns a cloned chain with a new initial value. - Add
predecessor
. - Add
property_of
,prop_of
. - Add
prune
. - Add
re_replace
. - Add
rearg
. - Add
replace
. - Add
run
as alias ofchain.value
. - Add
separator_case
. - Add
series_phrase
. - Add
series_phrase_serial
. - Add
slugify
. - Add
sort_by_all
. - Add
strip_tags
. - Add
substr_left
. - Add
substr_left_end
. - Add
substr_right
. - Add
substr_right_end
. - Add
successor
. - Add
swap_case
. - Add
title_case
. - Add
truncate
as alias oftrunc
. - Add
to_boolean
. - Add
to_dict
,to_plain_object
. - Add
to_number
. - Add
underscore_case
as alias ofsnake_case
. - Add
unquote
. - Fix
deep_has
to returnFalse
whenValueError
raised during path checking. - Fix
pad
so that it doesn't over pad beyond provided length. - Fix
trunc
/truncate
so that they handle texts shorter than the max string length correctly. - Make the following functions work with empty strings and
None
: (breaking change) Thanks k7sleeper!camel_case
capitalize
chars
chop
chop_right
class_case
clean
count_substr
decapitalize
ends_with
join
js_replace
kebab_case
lines
quote
re_replace
replace
series_phrase
series_phrase_serial
starts_with
surround
- Make callback invocation have better support for builtin functions and methods. Previously, if one wanted to pass a builtin function or method as a callback, it had to be wrapped in a lambda which limited the number of arguments that would be passed it. For example,
_.each([1, 2, 3], array.append)
would fail and would need to be converted to_.each([1, 2, 3], lambda item: array.append(item)
. That is no longer the case as the non-wrapped method is now supported. - Make
capitalize
acceptstrict
argument to control whether to convert the rest of the string to lower case or not. Defaults toTrue
. - Make
chain
support late passing of initialvalue
argument. - Make
chain
not store computedvalue()
. (breaking change) - Make
drop
,drop_right
,take
, andtake_right
have defaultn=1
. - Make
is_indexed
returnTrue
for tuples. - Make
partial
andpartial_right
accept keyword arguments. - Make
pluck
style callbacks support deep paths. (breaking change) - Make
re_replace
accept non-string arguments. - Make
sort_by
acceptreverse
parameter. - Make
splice
work with strings. - Make
to_string
convertNone
to empty string. (breaking change) - Move
arrays.join
tostrings.join
. (breaking change) - Rename
join
/implode
's second parameter fromdelimiter
toseparator
. (breaking change) - Rename
split
/explode
's second parameter fromdelimiter
toseparator
. (breaking change) - Reorder function arguments for
after
from(n, func)
to(func, n)
. (breaking change) - Reorder function arguments for
before
from(n, func)
to(func, n)
. (breaking change) - Reorder function arguments for
times
from(n, callback)
to(callback, n)
. (breaking change) - Reorder function arguments for
js_match
from(reg_exp, text)
to(text, reg_exp)
. (breaking change) - Reorder function arguments for
js_replace
from(reg_exp, text, repl)
to(text, reg_exp, repl)
. (breaking change) - Support iteration over class instance properties for non-list, non-dict, and non-iterable objects.
- Fix
remove
so that array is modified after callback iteration.
- Fix
kebab_case
so that it casts string to lower case.
- Add
ensure_ends_with
. Thanks k7sleeper! - Add
ensure_starts_with
. Thanks k7sleeper! - Add
quote
. Thanks k7sleeper! - Add
surround
. Thanks k7sleeper!
- Fix
merge
andassign
/extend
so they applyclone_deep
to source values before assigning to destination object. - Make
merge
accept a callback as a positional argument if it is last.
- Add
pipe
andpipe_right
as aliases offlow
andflow_right
. - Fix
merge
so that trailing{}
or[]
don't overwrite previous source values. - Make
py_
an alias for_
.
- Support
type
callbacks (e.g.int
,float
,str
, etc.) by only passing a single callback argument when invoking the callback. - Drop official support for Python 3.2. Too many testing dependencies no longer work on it.
- Add
append
. - Add
deep_get
. - Add
deep_has
. - Add
deep_map_values
. - Add
deep_set
. - Add
deep_pluck
. - Add
deep_property
. - Add
join
. - Add
pop
. - Add
push
. - Add
reverse
. - Add
shift
. - Add
sort
. - Add
splice
. - Add
unshift
. - Add
url
. - Fix bug in
snake_case
that resulted in returned string not being converted to lower case. - Fix bug in chaining method access test which skipped the actual test.
- Make
_
instance alias method access to methods with a trailing underscore in their name. For example,_.map()
becomes an alias formap_()
. - Make
deep_prop
an alias ofdeep_property
. - Make
has
work with deep paths. - Make
has_path
an alias ofdeep_has
. - Make
get_path
handle escaping the.
delimiter for string keys. - Make
get_path
handle list indexing using strings such as'0.1.2'
to access'value'
in[[0, [0, 0, 'value']]]
. - Make
concat
an alias ofcat
.
- Add
add
,sum_
. - Add
average
,avg
,mean
. - Add
mapiter
. - Add
median
. - Add
moving_average
,moving_avg
. - Add
power
,pow_
. - Add
round_
,curve
. - Add
scale
. - Add
slope
. - Add
std_deviation
,sigma
. - Add
transpose
. - Add
variance
. - Add
zscore
.
- Add
_
instance that supports both method chaining and module method calling. - Add
cat
. - Add
conjoin
. - Add
deburr
. - Add
disjoin
. - Add
explode
. - Add
flatten_deep
. - Add
flow
. - Add
flow_right
. - Add
get_path
. - Add
has_path
. - Add
implode
. - Add
intercalate
. - Add
interleave
. - Add
intersperse
. - Add
is_associative
. - Add
is_even
. - Add
is_float
. - Add
is_decreasing
. - Add
is_increasing
. - Add
is_indexed
. - Add
is_instance_of
. - Add
is_integer
. - Add
is_json
. - Add
is_monotone
. - Add
is_negative
. - Add
is_odd
. - Add
is_positive
. - Add
is_strictly_decreasing
. - Add
is_strictly_increasing
. - Add
is_zero
. - Add
iterated
. - Add
js_match
. - Add
js_replace
. - Add
juxtapose
. - Add
mapcat
. - Add
reductions
. - Add
reductions_right
. - Add
rename_keys
. - Add
set_path
. - Add
split_at
. - Add
thru
. - Add
to_string
. - Add
update_path
. - Add
words
. - Make callback function calling adapt to argspec of given callback function. If, for example, the full callback signature is
(item, index, obj)
but the passed in callback only supports(item)
, then onlyitem
will be passed in when callback is invoked. Previously, callbacks had to support all arguments or implement star-args. - Make
chain
lazy and only compute the final value whenvalue
called. - Make
compose
an alias offlow_right
. - Make
flatten
shallow by default, remove callback option, and addis_deep
option. (breaking change) - Make
is_number
returnFalse
for booleanTrue
andFalse
. (breaking change) - Make
invert
acceptmultivalue
argument. - Make
result
acceptdefault
argument. - Make
slice_
accept optionalstart
andend
arguments. - Move files in
pydash/api/
topydash/
. (breaking change) - Move predicate functions from
pydash.api.objects
topydash.api.predicates
. (breaking change) - Rename
create_callback
toiteratee
. (breaking change) - Rename
functions
tocallables
in order to allowfunctions.py
to exist at the root of the pydash module folder. (breaking change) - Rename private utility function
_iter_callback
toitercallback
. (breaking change) - Rename private utility function
_iter_list_callback
toiterlist_callback
. (breaking change) - Rename private utility function
_iter_dict_callback
toiterdict_callback
. (breaking change) - Rename private utility function
_iterate
toiterator
. (breaking change) - Rename private utility function
_iter_dict
toiterdict
. (breaking change) - Rename private utility function
_iter_list
toiterlist
. (breaking change) - Rename private utility function
_iter_unique
toiterunique
. (breaking change) - Rename private utility function
_get_item
togetitem
. (breaking change) - Rename private utility function
_set_item
tosetitem
. (breaking change) - Rename private utility function
_deprecated
todeprecated
. (breaking change) - Undeprecate
tail
and make alias ofrest
.
- Add
attempt
. - Add
before
. - Add
camel_case
. - Add
capitalize
. - Add
chunk
. - Add
curry_right
. - Add
drop_right
. - Add
drop_right_while
. - Add
drop_while
. - Add
ends_with
. - Add
escape_reg_exp
andescape_re
. - Add
is_error
. - Add
is_reg_exp
andis_re
. - Add
kebab_case
. - Add
keys_in
as alias ofkeys
. - Add
negate
. - Add
pad
. - Add
pad_left
. - Add
pad_right
. - Add
partition
. - Add
pull_at
. - Add
repeat
. - Add
slice_
. - Add
snake_case
. - Add
sorted_last_index
. - Add
starts_with
. - Add
take_right
. - Add
take_right_while
. - Add
take_while
. - Add
trim
. - Add
trim_left
. - Add
trim_right
. - Add
trunc
. - Add
values_in
as alias ofvalues
. - Create
pydash.api.strings
module. - Deprecate
tail
. - Modify
drop
to acceptn
argument and remove as alias ofrest
. - Modify
take
to acceptn
argument and remove as alias offirst
. - Move
escape
andunescape
frompydash.api.utilities
topydash.api.strings
. (breaking change) - Move
range_
frompydash.api.arrays
topydash.api.utilities
. (breaking change)
- Add Python 2.6 and Python 3 support.
- Add
after
. - Add
assign
andextend
. Thanks nathancahill! - Add
callback
andcreate_callback
. - Add
chain
. - Add
clone
. - Add
clone_deep
. - Add
compose
. - Add
constant
. - Add
count_by
. Thanks nathancahill! - Add
curry
. - Add
debounce
. - Add
defaults
. Thanks nathancahill! - Add
delay
. - Add
escape
. - Add
find_key
. Thanks nathancahill! - Add
find_last
. Thanks nathancahill! - Add
find_last_index
. Thanks nathancahill! - Add
find_last_key
. Thanks nathancahill! - Add
for_each
. Thanks nathancahill! - Add
for_each_right
. Thanks nathancahill! - Add
for_in
. Thanks nathancahill! - Add
for_in_right
. Thanks nathancahill! - Add
for_own
. Thanks nathancahill! - Add
for_own_right
. Thanks nathancahill! - Add
functions_
andmethods
. Thanks nathancahill! - Add
group_by
. Thanks nathancahill! - Add
has
. Thanks nathancahill! - Add
index_by
. Thanks nathancahill! - Add
identity
. - Add
inject
. - Add
invert
. - Add
invoke
. Thanks nathancahill! - Add
is_list
. Thanks nathancahill! - Add
is_boolean
. Thanks nathancahill! - Add
is_empty
. Thanks nathancahill! - Add
is_equal
. - Add
is_function
. Thanks nathancahill! - Add
is_none
. Thanks nathancahill! - Add
is_number
. Thanks nathancahill! - Add
is_object
. - Add
is_plain_object
. - Add
is_string
. Thanks nathancahill! - Add
keys
. - Add
map_values
. - Add
matches
. - Add
max_
. Thanks nathancahill! - Add
memoize
. - Add
merge
. - Add
min_
. Thanks nathancahill! - Add
noop
. - Add
now
. - Add
omit
. - Add
once
. - Add
pairs
. - Add
parse_int
. - Add
partial
. - Add
partial_right
. - Add
pick
. - Add
property_
andprop
. - Add
pull
. Thanks nathancahill! - Add
random
. - Add
reduce_
andfoldl
. - Add
reduce_right
andfoldr
. - Add
reject
. Thanks nathancahill! - Add
remove
. - Add
result
. - Add
sample
. - Add
shuffle
. - Add
size
. - Add
sort_by
. Thanks nathancahill! - Add
tap
. - Add
throttle
. - Add
times
. - Add
transform
. - Add
to_list
. Thanks nathancahill! - Add
unescape
. - Add
unique_id
. - Add
values
. - Add
wrap
. - Add
xor
.
- Add
all_
. - Add
any_
. - Add
at
. - Add
bisect_left
. - Add
collect
. - Add
collections
. - Add
compact
. - Add
contains
. - Add
detect
. - Add
difference
. - Add
drop
. - Add
each
. - Add
each_right
. - Add
every
. - Add
filter_
. - Add
find
. - Add
find_index
. - Add
find_where
. - Add
first
. - Add
flatten
. - Add
head
. - Add
include
. - Add
index_of
. - Add
initial
. - Add
intersection
. - Add
last
. - Add
last_index_of
. - Add
map_
. - Add
object_
. - Add
pluck
. - Add
range_
. - Add
rest
. - Add
select
. - Add
some
. - Add
sorted_index
. - Add
tail
. - Add
take
. - Add
union
. - Add
uniq
. - Add
unique
. - Add
unzip
. - Add
where
. - Add
without
. - Add
zip_
. - Add
zip_object
.