Skip to content

preparser does not respect leading space in front of "load foo.sage" #5052

@dandrake

Description

@dandrake

If you have something like the following in a file:

try:
    load foo.sage
except:
    print 'uh oh'

it gets preparsed to this, and blows up because of the bad indentation:

try:
execfile("foo.py")
except:
    print 'uh oh'

The preparser is not honoring the leading space before the load statement.

Component: misc

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions