Skip to content

String "1E10" is incorrectly formatted as float #266

@andy-maier

Description

@andy-maier

With tabulate 0.9.0 on Python 3.9:

$ python -c "from tabulate import tabulate; print(tabulate([['1E10']]))"
-----
1e+10
-----

When the value goes beyond a certain limit (the upper limit for 64-bit Python float), it accepts that it is a string:

$ python -c "from tabulate import tabulate; print(tabulate([['1E308']]))"
------
1e+308
------

$ python -c "from tabulate import tabulate; print(tabulate([['1E309']]))"
-----
1E309
-----

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions