syntax-error?
Fredrik Lundh
fredrik at pythonware.com
Fri Nov 23 14:34:12 EST 2001
Stefan Antoni wrote:
> I got the following script and it produces a syntax error which drives
> me crazy
here's how that function looks in my editor:
> def ExtractData(in_string, start_line, end_line):
> lstr = in_string.splitlines()
> j = 0 # a counter
> for i in lstr:
the lstr line uses four spaces for indentation, the lines after
it uses a single tab.
the python interpreter assumes that a tab is 8 spaces. it's
a good idea to use the same setting in your editor (or better,
to use only spaces or use only tabs).
editor configuration tips and tricks can be found here:
http://py-howto.sourceforge.net/editor/
</F>
<!-- (the eff-bot guide to) the python standard library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->
More information about the Python-list
mailing list