bidict v0.17.4 Release Notes
Release Date: 2018-11-14 // over 5 years ago-
Minor code, interop, and (semi-)private API improvements.
- :class:
~bidict.OrderedBidict
optimizations and code improvements.
Use
bidict
\s for the backing_fwdm
and_invm
mappings, obviating the need to store key and value data in linked list nodes.- 🔨 Refactor proxied- (i.e. delegated-) to-
_fwdm
logic for better composability and interoperability.
Drop the
_Proxied*
mixin classes and instead move their methods into :class:~bidict.BidictBase
, which now checks for an object defined by theBidictBase.__delegate__
attribute. TheBidictBase.__delegate__
object will be delegated to if the method is available on it, otherwise a default implementation (e.g. inherited from :class:~collections.abc.Mapping
) will be used otherwise. Subclasses may set__delegate__ = None
to opt out.Consolidate
_MutableBidict
into :class:bidict.bidict
now that the dropped mixin classes make it unnecessary.Change
__repr_delegate__
to simply take a type like :class:dict
or :class:list
.⬆️ Upgrade to latest major
sortedcontainers <https://github.com/grantjenks/python-sortedcontainers>
__ version (from v1 to v2) for the :ref:extending:\
`SortedBidict`` Recipes`.bidict.compat.{view,iter}{keys,values,items}
on Python 2 no longer assumes the target object implements these methods, as they're not actually part of the :class:~collections.abc.Mapping
interface, and provides fallback implementations when the methods are unavailable. This allows the :ref:extending:\
`SortedBidict`` Recipes` to continue to work with sortedcontainers v2 on Python 2.
- :class: