Skip to content

Commit f7cf536

Browse files
committed
[dimension] tiny simplification
1 parent 216c9f6 commit f7cf536

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nixio/dimensions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ def range_indices(self, start_position, end_position, mode=SliceMode.Exclusive):
693693
:raises: ValueError if invalid mode is given
694694
:raises: Index Error if start position is greater than end position.
695695
"""
696-
if mode is not SliceMode.Exclusive and mode is not SliceMode.Inclusive:
696+
if mode not in (SliceMode.Exclusive, SliceMode.Inclusive):
697697
raise ValueError("Unknown SliceMode: {}".format(mode))
698698
if start_position > end_position:
699699
raise IndexError("Start position {} is greater than end position {}.".format(start_position, end_position))

0 commit comments

Comments
 (0)