Skip to content

Issue on page /altair_introduction.html - positional and keyword arguments can't be interleaved in Python #33

@quale1

Description

@quale1

Section 1.5 Marks and Encodings says
"The two styles of specifying encodings can be interleaved: x='precip', alt.Y('city') is also a valid input to the encode function."

Positional arguments and keyword arguments can't be interleaved in Python. Python requires positional arguments to come before keyword arguments making encode(x='precip', alt.Y('city')) a syntax error.

Both the use of the word "interleaved" and the argument order in the example are suboptimal.

Instead of "interleaved" it could instead say something like "The two styles of encodings can be used together as long as the keyword arguments come last: alt.X('precip'), y='city' is also valid ..."

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