olopez32 / tinypy

Automatically exported from code.google.com/p/tinypy
Other
0 stars 0 forks source link

tinypy does not handle tabs in input files correctly. #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Try to compile:

def func(a):
    if a<0.5:
        return 0,0
    else:
        return 1.0

print(func(3))

But use tabs infront to the "return" statements.

2. Run the compiler  it prints this message:

Exception:
error: tokenize
   4:   return 0,0
      ^

What is the expected output? What do you see instead?

    I'd expect tinypy to expand tabs in the input file into 
    equivalent spaces, like Cpython does.  Something like the 
    unix command expand:

    expand -8 < tabs.py > notabs.py

What version of the product are you using? On what operating system?

    tinypy version 1.1 OSX 10.7.5

Please provide any additional information below.

    Please see the attached file.

Original issue reported on code.google.com by paulhaeb...@gmail.com on 17 Feb 2013 at 8:02

Attachments: