[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-27 Thread Mark Dickinson
Mark Dickinson added the comment: Looks like this was merged to release26-maint by Georg in r75790. Thanks, Georg! -- status: open -> closed ___ Python tracker ___

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Mark Dickinson
Changes by Mark Dickinson : -- versions: -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks Georg and Eric for the feedback! New wording committed in r75289 (trunk), r75290 (py3k), r75291 (release31-maint). Leaving open for the backport to release26-maint. BTW, it's much easier to describe the rules in Python than in prose: def strip_zero_d

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread R. David Murray
R. David Murray added the comment: I think the 'as if with' is probably valid English, but if you want to make it sound better yet retain the same level of pedantry you could instead say, e.g.: "in the same way as presentation type e using precision p-1". -- nosy: +r.david.murray priori

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Mark Dickinson
Mark Dickinson added the comment: Okay. I'll replace the 'as if with' with simply 'with'. That doesn't quite meet my favoured level of pedantry any more, but it does read better and it's not going to lead to any confusion. :) -- ___ Python track

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Georg Brandl
Georg Brandl added the comment: The "as if with" feels strange, otherwise it is fine with me. -- nosy: +georg.brandl ___ Python tracker ___ __

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Eric Smith
Eric Smith added the comment: I obviously hadn't thought of those cases, either. This version looks good(er) to me. -- ___ Python tracker ___

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Eric. I noticed that the description was missing details of what happens to trailing zeros (i.e., they're removed) and what happens to special values: infinities, zeros, nans. Here's the revised revised text: General format. For a given precision `

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Eric Smith
Eric Smith added the comment: That wording is okay with me. Maybe run it by Georg to see if he has any suggestions? Or just check it in and see if anyone complains. But I'm okay with it as-is. Thanks for doing this. Eric. -- ___ Python tracker

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Mark Dickinson
Mark Dickinson added the comment: Proposed revision: General format. For a given precision ``p >= 1``, this rounds the number to ``p`` significant digits and then formats the result in either fixed-point format or in scientific notation, depending on its magnitude. The precise rules are a

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Mark Dickinson
Mark Dickinson added the comment: Ah. Found them. http://docs.python.org/library/string.html#formatspec -- ___ Python tracker ___ __

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Mark Dickinson
Mark Dickinson added the comment: Benjamin, which docs are you looking at here? The ones at: http://docs.python.org/library/stdtypes.html#string-formatting-operations say: """Floating point format. Uses lowercase exponential format if exponent is less than -4 or not less than precision, dec

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: That's amusing. The moment I submitted the comment above I remember thinking 'Hmm. I could have explained that better.' I'll try to come up with a doc patch. Stealing the issue from Eric. -- assignee: eric.smith -> mark.dickinson _

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-07 Thread Eric Smith
Eric Smith added the comment: Mark's really the expert here, so I trust his description. Is his description layman-speak enough for the docs? -- ___ Python tracker ___ __

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: For 'g' formatting (either {} style or %-style) with precision p >= 1, I believe fixed- point is used if and only if the formatted value satisfies 1e-4 <= abs(formatted_value) < 10**precision. Note that the 'formatted value' refers to the value rounded to p

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-03 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-03 Thread Benjamin Peterson
New submission from Benjamin Peterson : The docs for 'g' say "This prints the number as a fixed-point number, unless the number is too large." Could you please explain what exactly constitutes "too large"? -- assignee: eric.smith messages: 93504 nosy: benjamin.peterson, eric.smith severi