Hi David,
Perhaps the "n" locale-dependent number formatting specifier
should accept a , to have locale-appropriate formatting of thousand
separators?
f"{x:,n}"
would Do The Right Thing(TM) depending on the locale.
Today it is an error.
Stephan
2018-01-28 7:25 GMT+01:00 David Mertz :
> In So
It’s my opinion that instead of adding syntax, we should instead encourage
using number formatting library functions.
* You can replace the function or have the function dispatch differently
depending on locale
* It means that syntax doesn’t need to be extended for every use case – its
ea
On 28 January 2018 at 17:35, Pau Freixes wrote:
>> At a technical level, the biggest problems relate to the way we
>> manipulate frame objects at runtime, including the fact that we expose
>> those frames programmatically for the benefit of debuggers and other
>> tools.
>
> Shoudnt be something th
On 28 January 2018 at 19:30, Stephan Houben wrote:
> Hi David,
>
> Perhaps the "n" locale-dependent number formatting specifier
> should accept a , to have locale-appropriate formatting of thousand
> separators?
>
> f"{x:,n}"
>
> would Do The Right Thing(TM) depending on the locale.
Checking http
On 1/28/2018 6:51 AM, Nick Coghlan wrote:
On 28 January 2018 at 19:30, Stephan Houben wrote:
Hi David,
Perhaps the "n" locale-dependent number formatting specifier
should accept a , to have locale-appropriate formatting of thousand
separators?
f"{x:,n}"
would Do The Right Thing(TM) depending
On Sun, Jan 28, 2018 at 09:51:05PM +1000, Nick Coghlan wrote:
> Checking https://www.python.org/dev/peps/pep-0378/, we did suggest
> using the locale module for cases where the engineering style
> groups-of-three structure wasn't appropriate, with the parallel being
> drawn to the fact that you al
On Sat, 27 Jan 2018 22:18:08 +0100
Pau Freixes wrote:
>
> Correct me if I'm wrong, but most of you argue that the proper Zen of
> Python - can we say it mutability [1]? as Victor pointed out - that
> allow the user have the freedom to mutate objects in runtime goes in
> the opposite direction of
On Sun, Jan 28, 2018 at 5:46 AM, Eric V. Smith wrote:
> If I recall correctly, we discussed this at the time, and the problem with
> locale is that it's not thread safe. I agree that if it were, it would be
> nice to be able to use it, either with 'n', or in some other mode just for
> grouping.
>
On Fri, Jan 26, 2018 at 09:46:51PM +0100, liam marsh wrote:
> Hello,
> Some time ago, I set up some logging using stdout in a program with the
> `stdout_redirected()` context manager, which had to close and reopen
> stdout to work.
> Unsurprisingly, the StreamHandler didn't take it well.
>
> So
I actually didn't know about `locale.format("%d", 10e9, grouping=True)`.
But it's still much less general than having the option in the
f-string/.format() mini-language. This is really about the formatted
string, not necessarily about the locale. So, e.g. I'd like to be able to
write:
>>> print(
On Sun, Jan 28, 2018 at 5:31 PM, David Mertz wrote:
> I actually didn't know about `locale.format("%d", 10e9, grouping=True)`.
> But it's still much less general than having the option in the
> f-string/.format() mini-language. This is really about the formatted
> string, not necessarily about th
Sorry for the long delay. I had a lot on my plate at work, and was
spending 14 hours a day sleeping because of the flu. "It got better."
Rob Speer writes:
> I don't really understand what you're doing when you take a
> fragment of my sentence where I explain a wrong understanding of
> WHATWG
On 29 January 2018 at 11:48, Nathaniel Smith wrote:
> On Sun, Jan 28, 2018 at 5:31 PM, David Mertz wrote:
>> I actually didn't know about `locale.format("%d", 10e9, grouping=True)`.
>> But it's still much less general than having the option in the
>> f-string/.format() mini-language. This is rea
13 matches
Mail list logo