Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken ordinal cases #192

Open
jaraco opened this issue Jul 3, 2023 · 0 comments
Open

Broken ordinal cases #192

jaraco opened this issue Jul 3, 2023 · 0 comments

Comments

@jaraco
Copy link
Owner

jaraco commented Jul 3, 2023

Currently, there are two cases that are uncovered by the tests and produce potentially surprising results:

float that's also an integer

>>> ordinal(1.0)
'1.0st'

That's surprising because other float values produce the suffix based on the last digit of the float (e.g. "1.0th").

float with no decimal digits

>>> ordinal('1.')
'1.st'

Does "1.st" even make sense? The code does attempt to support this case, but I'm not at all confident it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant