Skip to content

Add more examples for when srange is better than range #17373

@kcrisman

Description

@kcrisman

There are some examples but often this is crowded out. A new user might be proud to have discovered the dot notation for methods, and then get a nasty surprise, like

     for p in range(1,50) :
        if (p.is_prime()) :
           print p

from #1678.

Anyway, in various places this would be a good idea - especially various tutorials and intros to programming.

Component: documentation

Issue created by migration from https://trac.sagemath.org/ticket/17373

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions