equinor / segyio

Fast Python library for SEGY files.
Other
469 stars 213 forks source link

Use isintance to check if key is a slice #567

Closed sveinung-r closed 7 months ago

sveinung-r commented 7 months ago

Starting from Python 3.12 slice is hashable. Passing a slice as a dict key will thus no longer yield a TypeError. We were checking for this as a means to trigger an alternative codepath in the case where the key was a slice.