Changeset 6434:5d5b77cb7966


Ignore:
Timestamp:
09/20/07 15:18:10 (6 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Message:

Make sure preparse doesn't raise exceptions (for now).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sage/misc/preparser.py

    r6417 r6434  
    303303def preparse(line, reset=True, do_time=False, ignore_prompts=False): 
    304304 
    305     # [1,2,..,n] notation 
    306     L, literals = strip_string_literals(line) 
    307     L = parse_ellipsis(L) 
    308     line = L % literals 
     305    try: 
     306        # [1,2,..,n] notation 
     307        L, literals = strip_string_literals(line) 
     308        L = parse_ellipsis(L) 
     309        line = L % literals 
     310    except SyntaxError: 
     311        pass 
    309312 
    310313    # find where the parens are for function assignment notation 
Note: See TracChangeset for help on using the changeset viewer.