In article <[EMAIL PROTECTED]>,
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
> "Mr. Magoo" wrote:
>
> > Can someone provide a snippet which, when run, generates a TabError?
> >
> > I can only seem to get SyntaxError and IndentationError.
>
> $ python -c "print repr(open('test.py').read())"
> 'if 1:\n\tprint "hello"\n print "goodbye"\n'
>
> $ python test.py
> hello
> goodbye
>
> $ python -t test.py
> test.py: inconsistent use of tabs and spaces in indentation
> hello
> goodbye
>
> $ python -tt test.py
> File "test.py", line 3
> print "goodbye"
> ^
> TabError: inconsistent use of tabs and spaces in indentation
>
> </F>
Thanks.
Is there a reason (good or otherwise :-) why py_compile dumps this and
IndentationError in a different format than SyntaxError?
M
--
http://mail.python.org/mailman/listinfo/python-list