Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for fractions module needs work #47447

Closed
mdickinson opened this issue Jun 25, 2008 · 5 comments
Closed

Documentation for fractions module needs work #47447

mdickinson opened this issue Jun 25, 2008 · 5 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@mdickinson
Copy link
Member

BPO 3197
Nosy @mdickinson
Files
  • fractions_doc.patch: Documentation update for fractions module
  • fractions_doc2.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/mdickinson'
    closed_at = <Date 2008-06-27.17:04:38.708>
    created_at = <Date 2008-06-25.11:22:22.039>
    labels = ['docs']
    title = 'Documentation for fractions module needs work'
    updated_at = <Date 2008-06-27.17:04:38.707>
    user = 'https://github.com/mdickinson'

    bugs.python.org fields:

    activity = <Date 2008-06-27.17:04:38.707>
    actor = 'mark.dickinson'
    assignee = 'mark.dickinson'
    closed = True
    closed_date = <Date 2008-06-27.17:04:38.708>
    closer = 'mark.dickinson'
    components = ['Documentation']
    creation = <Date 2008-06-25.11:22:22.039>
    creator = 'mark.dickinson'
    dependencies = []
    files = ['10728', '10750']
    hgrepos = []
    issue_num = 3197
    keywords = ['patch']
    message_count = 5.0
    messages = ['68724', '68734', '68824', '68833', '68835']
    nosy_count = 2.0
    nosy_names = ['mark.dickinson', 'jyasskin']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue3197'
    versions = ['Python 2.6', 'Python 3.0', 'Python 2.7']

    @mdickinson
    Copy link
    Member Author

    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.

    @mdickinson mdickinson self-assigned this Jun 25, 2008
    @mdickinson mdickinson added the docs Documentation in the Doc dir label Jun 25, 2008
    @mdickinson
    Copy link
    Member Author

    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?

    @mdickinson
    Copy link
    Member Author

    Here's an updated doc patch; it fixes an indentation issue in the
    previous patch, and adds documentation for the exported gcd function.

    @jyasskin
    Copy link
    Mannequin

    jyasskin mannequin commented Jun 27, 2008

    [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!

    @mdickinson
    Copy link
    Member Author

    Shouldn't make the second '.' optional or this will match plain
    numerators too.

    Thanks. Fixed, and committed in r64561 (trunk), and r64562 (py3k).

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant