- Minor performance optimization in
pick
.
- Fix regression in
v0.5.1
that brokeget/has
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.
- Fix bug in
intersection/intersectionby
anddifference/differenceby
where incorrect results could be returned when generators passed in as the sequences to compare with. - Add support for Python 3.9.
- Drop support for Python <= 3.5.
- Add functions:
differenceby
duplicatesby
intersectionby
unionby
- compose: Introduce new "partial" shorthand where instead of passing a callable, a
tuple
can be given which will then be converted to a callable usingfunctools.partial
. For example, instead offnc.compose(partial(fnc.filter, {'active': True}), partial(fnc.map, 'email'))
, one can dofnc.compose((fnc.filter, {'active': True}), (fnc.map, 'email'))
.
- Add functions:
negate
over
overall
overany
- Rename functions: (breaking change)
ismatch -> conforms
matches -> conformance
- Make
conforms/conformance
(formerlyismatch/matches
) accept callable dictionary values that act as predicates against comparison target. (breaking change)
- pick: Don't return
None
for keys that don't exist in source object. Instead offnc.pick(['a'], {}) == {'a': None}
, it's nowfnc.pick(['a'], {}) == {}
.
- First release.