diff --git a/docs/release.rst b/docs/release.rst index 0205433f..a29d6464 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -21,6 +21,9 @@ Fix Maintenance ~~~~~~~~~~~ +* Remove unnecessary None argument to .get(), it is the default value. + By :user:`Dimitri Papadopoulos Orfanos `, :issue:`395`. + * Apply refurb suggestions. By :user:`Dimitri Papadopoulos Orfanos `, :issue:`372`. diff --git a/numcodecs/ndarray_like.py b/numcodecs/ndarray_like.py index 23d4fd41..22fe2d06 100644 --- a/numcodecs/ndarray_like.py +++ b/numcodecs/ndarray_like.py @@ -20,7 +20,7 @@ class _CachedProtocolMeta(Protocol.__class__): def __instancecheck__(self, instance): key = (self, instance.__class__) - ret = self._instancecheck_cache.get(key, None) + ret = self._instancecheck_cache.get(key) if ret is None: ret = super().__instancecheck__(instance) self._instancecheck_cache[key] = ret