Boštjan Mejak <bostjan.me...@gmail.com> added the comment:

{'mon_decimal_point': '', 'int_frac_digits': 127, 'p_sep_by_space': 127,
'frac_digits': 127, 'thousands_sep': '', 'n_sign_posn': 127,
'decimal_point': '.', 'int_curr_symbol': '', 'n_cs_precedes': 127,
'p_sign_posn': 127, 'mon_thousands_sep': '', 'negative_sign': '',
'currency_symbol': '', 'n_sep_by_space': 127, 'mon_grouping': [],
'p_cs_precedes': 127, 'positive_sign': '', 'grouping': []}

'2.760'

And the output of locale.format() in this case should be
'2,760'

On Mon, Oct 18, 2010 at 2:00 PM, Eric Smith <rep...@bugs.python.org> wrote:

>
> Eric Smith <e...@trueblade.com> added the comment:
>
> Oops, I meant "locale.format('%.3f', 2.76)", although of course the number
> shouldn't matter.
>
> ----------
>
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue10135>
> _______________________________________
>

----------
Added file: http://bugs.python.org/file19265/unnamed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10135>
_______________________________________
<div>&gt;&gt;&gt; import locale<br>&gt;&gt;&gt; locale.localeconv()</div>
<div><div>{&#39;mon_decimal_point&#39;: &#39;&#39;, &#39;int_frac_digits&#39;: 
127, &#39;p_sep_by_space&#39;: 127, &#39;frac_digits&#39;: 127, 
&#39;thousands_sep&#39;: &#39;&#39;, &#39;n_sign_posn&#39;: 127, 
&#39;decimal_point&#39;: &#39;.&#39;, &#39;int_curr_symbol&#39;: &#39;&#39;, 
&#39;n_cs_precedes&#39;: 127, &#39;p_sign_posn&#39;: 127, 
&#39;mon_thousands_sep&#39;: &#39;&#39;, &#39;negative_sign&#39;: &#39;&#39;, 
&#39;currency_symbol&#39;: &#39;&#39;, &#39;n_sep_by_space&#39;: 127, 
&#39;mon_grouping&#39;: [], &#39;p_cs_precedes&#39;: 127, 
&#39;positive_sign&#39;: &#39;&#39;, &#39;grouping&#39;: []}</div>
</div>

<div> </div>
<div>It prints this:</div>
<div>&gt;&gt;&gt; import locale<br>&gt;&gt;&gt; locale.format(&#39;%.3f&#39;, 
2.76)<br>&#39;2.760&#39;</div>
<div> </div>
<div>And the output of locale.format() in this case should be</div>
<div>&#39;2,760&#39;<br><br></div>
<div class="gmail_quote">On Mon, Oct 18, 2010 at 2:00 PM, Eric Smith <span 
dir="ltr">&lt;<a href="mailto:rep...@bugs.python.org"; 
target="_blank">rep...@bugs.python.org</a>&gt;</span> wrote:<br>
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 
0.8ex;padding-left:1ex" class="gmail_quote">
<div><br>Eric Smith &lt;<a href="mailto:e...@trueblade.com"; 
target="_blank">e...@trueblade.com</a>&gt; added the 
comment:<br><br></div>Oops, I meant &quot;locale.format(&#39;%.3f&#39;, 
2.76)&quot;, although of course the number shouldn&#39;t matter.<br>

<br>----------<br>
<div>
<div></div>
<div><br>_______________________________________<br>Python tracker &lt;<a 
href="mailto:rep...@bugs.python.org"; 
target="_blank">rep...@bugs.python.org</a>&gt;<br>&lt;<a 
href="http://bugs.python.org/issue10135"; 
target="_blank">http://bugs.python.org/issue10135</a>&gt;<br>

_______________________________________<br></div></div></blockquote></div><br>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to