Closed Rotzbua closed 1 year ago
@Rotzbua thanks for bringing this up! Currently if you compare Affine instances for other than ==
you get a TypeError. If we were to delete all the existing compatibility code, you would get False
. I think that's a fine result, but we might want to wait until a 3.0.0 to make a breaking change.
My intention was to simplify the the code to just:
# No implicit ordering (newer Python)
def assert_unorderable(a, b):
"""Assert that a and b are unorderable"""
return NotImplemented
Because with Python3 the exemption TypeError
is always thrown and the else
part is never executed.
Cool, I'll leave at that for now.
I am not sure but I think this is outdated code for python2 and 3 compatibility? https://github.com/rasterio/affine/blob/28867073714191cfda929b89f2a3023d82e07e27/affine/__init__.py#L61-L78