Skip to content

problem in tabulate 0.10.0 on python 3.11.12 with cell values like "100,120" #448

Description

@aspr5307

got a problem when cell with content of "100,120" gets casted within code snippet:

casted_cell = (
missingval
if cell is None
else (
str(cell)
if cell == "" or _isnumber(cell)
else str(_type(cell, numparse)(cell))
)
)

_type is defined as def _type(string, has_invisible=True, numparse=True):

numparse is on 3rd place. in call _type(cell, numparse) numparse argument on 2nd place will be taken as argument has_invisible and numparse will get its default which is True.

=> argument disable_numparse of tabulate call will be ignored and "100,120" will fail as it is casted as integer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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