[issue46183] float function errors on negative number string with comma seperator ex: '-1, 234.0'

2021-12-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: Aside: for what it is worth, the British style with a middle dot is also not supported: float('1ยท234') also raises ValueError. -- ___ Python tracker

[issue46183] float function errors on negative number string with comma seperator ex: '-1, 234.0'

2021-12-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: The behaviour is correct and not a bug. Commas are not supported when converting strings to float. The allowed format for floats as strings is described in the docs: https://docs.python.org/3/library/functions.html#float By the way, the negative sign is

[issue46183] float function errors on negative number string with comma seperator ex: '-1, 234.0'

2021-12-26 Thread syed shah
New submission from syed shah : >>> float ('-1,234') Traceback (most recent call last): File "", line 1, in ValueError: could not convert string to float: '-1,234' -- components: Library (Lib) messages: 409202 nosy: jj.github.jj priority: normal severity: normal status: open title: