Skip to content

Consistency in code examples, newline or no newline? #128716

@StanFromIreland

Description

@StanFromIreland

Currently there is a mixture of including the empty line and not including it for example in the decimal docs:

>>> def mul(x, y, fp=TWOPLACES):
    ...     return (x * y).quantize(fp)
    ...

>>> def div(x, y, fp=TWOPLACES):
    ...     return (x / y).quantize(fp)

>>> def remove_exponent(d):
    ...     return d.quantize(Decimal(1)) if d == d.to_integral() else d.normalize()

I propose we standardize this to either including it or not including it. (I'm a very big fan of consistency)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirpendingThe issue will be closed if no feedback is provided

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions