Skip to content

Python 2 syntax in examples, why? #1091

Closed
@matheusfelipeog

Description

@matheusfelipeog

Hi :)

Why use python 2 syntax in examples today? Since Python 2 has been discontinued in January 1, 2020.

Examples:

four_lists = [[] for __ in xrange(4)]

instead:

four_lists = [[] for __ in range(4)]

Has a note stating the new syntax:

Note: Use range() instead of xrange() in Python 3.

But is this really necessary today? Isn't it better to update everything to Python 3 syntax?

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