Skip to content

Confusing sentences in Starlark spec need correction #347

Description

@againjj

Go here:
https://github.com/bazelbuild/starlark/blob/c0af0ea03dc90d3bbc021394b693e6957cc15030/spec.md

  1. There is a sentence:
    """
    Starlark has no equivalent of Python's nonlocal keyword, and thus no way for an inner function cannot assign to a local variable of an outer function.
    """
    I believe it should be either:
    """
    Starlark has no equivalent of Python's nonlocal keyword, and thus no way for an inner function to assign to a local variable of an outer function.
    """
    or:
    """
    Starlark has no equivalent of Python's nonlocal keyword, and thus an inner function cannot assign to a local variable of an outer function.
    """

  2. There is a sentence:
    """
    The compact form %g is also used by str(float). Its result uses the least precision required to accurately represent the value, omits unnecessary trailing zeros in the significand (along with the decimal point itself if the significand has no fraction), and always contains a decimal point or an exponent and thus unambiguously denotes a float, not an int.
    """
    Either it "omits unnecessary trailing zeros in the significand (along with the decimal point itself if the significand has no fraction)" or it "always contains a decimal point or an exponent", but both cannot be true at the same time. In the examples for %g in the preceding table, "1200" was an example, so "always contains a decimal point or an exponent" is probably incorrect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions