Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tomschr
Copy link
Member

@tomschr tomschr commented Nov 8, 2020

The former code raised a TypeError exception for comparisons like __gt__, __lt__ etc. to indicate a wrong type.

However, according to NotImplemented documentation, we should return(!) NotImplemented (not raise) when a comparison with an invalid type is not implemented.

The former code raised a TypeError exception for comparisons
like __gt__, __lt__ etc. to indicate a wrong type.

However, according to NotImplemented[1] documentation,
we should return(!) NotImplemented (not raise) when a
comparison with an invalid type is not implemented.

[1] https://docs.python.org/3/library/constants.html#NotImplemented
@tomschr tomschr added the Bug Error, flaw or fault to produce incorrect or unexpected results label Nov 8, 2020
@tomschr tomschr self-assigned this Nov 8, 2020
@tomschr tomschr merged commit c75737d into python-semver:master Nov 8, 2020
@tomschr tomschr deleted the bugfix/316-notimplemented branch November 8, 2020 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Error, flaw or fault to produce incorrect or unexpected results

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant