HighDots Forums  

Re: regexp help

Python Python programming language mailing list


Discuss Re: regexp help in the Python forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark Sapiro
 
Posts: n/a

Default Re: regexp help - 11-02-2009 , 06:53 PM






Savoy, Jim wrote:
Quote:
You used some kind of word processor to create foo.py that concatenated
lines 2 and 3 into a single line. Your Foo.py file must be just like
my original example with lines 1, 2 and 3 at the left margin, lines 4
and 6 indented 4 spaces and lines 5, 7, 8 and 9 indented 8 spaces.

These words you are saying are all true. I just "cut" your code in
Outlook and "pasted" it in vi. I will try it again with the indenting
you suggested (reminds me of Fortran!). Thanks.

Depending on the options set in vi, it can do horrible things to
indentation when you paste things in

Python is not at all like Fortran, In Fortran (at least through Fortran
IV - I never did much with Fortran 77 and nothing beyond that) white
space except for line endings is totally insignificant. True, you have
some formatting restrictions like positions 1 - 5 for statement
numbers, 6 for continuation and 7 - 72 for statements (although some
compilers relaxed these), but consider that the compiler's
parser/tokenizer doesn't know whether

do 5 i = 1, 10

is a do loop or an assignment to a variable named do5i until it gets to
the comma.

In Python, whitespace is of utmost significance. You either love it or
hate it, but block structure is based entirely on indentation.

--
Mark Sapiro <mark (AT) msapiro (DOT) net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list Mailman-Users (AT) python (DOT) org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: http://mail.python.org/mailman/options/mailman-users/python%40highdots.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.