SethMMorton / fastnumbers

Super-fast and clean conversions to numbers for Python.
https://pypi.org/project/fastnumbers/
MIT License
105 stars 13 forks source link

[new feature] priority of conversion? #11

Closed wavefancy closed 6 years ago

wavefancy commented 6 years ago

Request

Is there a way if the input can be parsed as int just return as int, otherwise return as float, then as string.

SethMMorton commented 6 years ago

Yes, this is the purpose of the fast_real function.

SethMMorton commented 6 years ago

Did this answer your question?

wavefancy commented 6 years ago

Yes, thanks much! Already used in my project.

Wallace

On Mon, Mar 19, 2018 at 8:52 PM, Seth Morton notifications@github.com wrote:

Did this answer your question?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SethMMorton/fastnumbers/issues/11#issuecomment-374435162, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZnckpiycAVDQUaWhcOZ5i-83IBXWkcks5tgFK_gaJpZM4SbNqU .