Issue 3197: Documentation for fractions module needs work (original) (raw)

Created on 2008-06-25 11:22 by mark.dickinson, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fractions_doc.patch mark.dickinson,2008-06-25 16:09 Documentation update for fractions module
fractions_doc2.patch mark.dickinson,2008-06-27 11:16
Messages (5)
msg68724 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-06-25 11:22
The documentation for the fractions module needs some rewriting---it contains minor inaccuracies, outdated statements (e.g. the regex is incomplete), and there are places that could use some clarification (e.g. the description of __round__). I plan to take care of this in the next few days, unless anyone else wants to have a look. I'm making an issue of it so that it doesn't get forgotten.
msg68734 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-06-25 16:09
Here's a proposed new draft of the fractions documentation for 2.6. Apart from wording changes, it: - removes documentation for __floor__, __ceil__ and __round__, since those no longer exist in 2.6 - describes construction from a decimal string; e.g. Fraction('1.23') - gives the acceptable string inputs using BNF rather than via a regex. Jeffrey: does this look reasonable?
msg68824 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-06-27 11:16
Here's an updated doc patch; it fixes an indentation issue in the previous patch, and adds documentation for the exported gcd function.
msg68833 - (view) Author: Jeffrey Yasskin (jyasskin) * (Python committer) Date: 2008-06-27 16:34
> [sign] integer '.' [fraction] | [sign] ['.'] fraction Shouldn't make the second '.' optional or this will match plain numerators too. Otherwise, looks good. Thanks for fixing this!
msg68835 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-06-27 17:04
> Shouldn't make the second '.' optional or this will match plain > numerators too. Thanks. Fixed, and committed in r64561 (trunk), and r64562 (py3k).
History
Date User Action Args
2022-04-11 14:56:35 admin set github: 47447
2008-06-27 17:04:38 mark.dickinson set status: open -> closedresolution: fixedmessages: +
2008-06-27 16:34:49 jyasskin set messages: +
2008-06-27 11:16:51 mark.dickinson set files: + fractions_doc2.patchmessages: +
2008-06-25 16:09:42 mark.dickinson set files: + fractions_doc.patchkeywords: + patchmessages: +
2008-06-25 11:22:22 mark.dickinson create