[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-09-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: -10796 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-09-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: -10794 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-09-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: -10795 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-09-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: I had thought that use a locales were deemed an anti-pattern (not easy-to-use, not thread-safe, etc). -- nosy: +rhettinger ___ Python tracker

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-09-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-09-15 Thread Karl Ove Hufthammer
Change by Karl Ove Hufthammer : -- nosy: +huftis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-09 Thread STINNER Victor
STINNER Victor added the comment: > By the way, the decimal module doesn't support properly the following corner > case: LC_NUMERIC using an encoding different than LC_CTYPE encoding. I wrote > https://github.com/python/cpython/pull/5191 but I abandonned my change. FYI I opened bpo-35697 to

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-09 Thread Łukasz Stelmach
Łukasz Stelmach added the comment: I'd appreciate, if we continued the discussion at python-ideas, where I posted the idea[1]. There has already been several valuable comments. [1] https://mail.python.org/pipermail/python-ideas/2019-January/054793.html --

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-09 Thread Stefan Krah
Stefan Krah added the comment: > Since it seems like we are still at the "idea" stage, would it make sense to > add a function which accept options to choose how to format a number? Maybe, but I think for format() Eric's latest proposal on python-ideas is great ("*f" for "f + LC_NUMERIC",

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-08 Thread STINNER Victor
STINNER Victor added the comment: Łukasz Stelmach: > It is currently impossible to format floating point numbers with an arbitrary > number of decimal digits AND the decimal point matching locale settings. I would like to warn you that handling properly locales can be very tricky. I just

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-05 Thread Łukasz Stelmach
Łukasz Stelmach added the comment: Indeed. Thank you. I was sure I had tried this. However, this is still only a workaround and not the solution I need. I am working on a project now which uses pint https://pint.readthedocs.io/en/latest/ which uses format() and its relatives. With "n"

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can use locale.format_string() for locale aware formatting. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-03 Thread Stefan Krah
Stefan Krah added the comment: For reference, the (one of the?) other GitHub issue(s) is here: https://github.com/python/cpython/pull/8612 It actually proposes to use LC_MONETARY. -- ___ Python tracker

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-03 Thread Łukasz Stelmach
Łukasz Stelmach added the comment: As much as I am open to any suggestions for naming and such (although I think 'm' together with 'n' are a good supplement for 'f' and 'g'), I really would like to introduce a method to format numbers with fixed number of decimal digits (it looks good in

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-03 Thread Stefan Krah
Stefan Krah added the comment: I think there's another open GitHub issue for this, and yes, probably it should be discussed on python-ideas, too. My main concern with 'm' for libmpdec is that I'd like to reserve it for LC_MONETARY. There was one OS X issue that would have been solved by

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-03 Thread Łukasz Stelmach
Łukasz Stelmach added the comment: > I haven't looked at this closely yet, but you'll need to at least: > - add tests that the locale-aware formatting is happening Done. > - support decimal > - make sure it works with complex Good points. Done. Please note, that there is an inconsistency

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-02 Thread Eric V. Smith
Eric V. Smith added the comment: I haven't looked at this closely yet, but you'll need to at least: - add tests that the locale-aware formatting is happening - support decimal - make sure it works with complex (which it probably does, but needs a test) And, I think we'll need to run this