NeighborList: Ensure self.idx is always set

This commit is contained in:
Florian Bruhin 2014-02-20 20:46:29 +01:00
parent e1fe6111ec
commit 858ff4a4f0

View File

@ -58,6 +58,8 @@ class NeighborList:
self._default = default
if default is not _UNSET:
self.idx = self._items.index(default)
else:
self.idx = None
self._mode = mode
@property