[oclug] Ruby
Michael P. Soulier
msoulier at digitaltorque.ca
Fri Jun 27 09:13:59 EDT 2003
On 27/06/03 Rod Giffin did speaketh:
> I'm beginning to warm up to this idea Francis :) It would cut down on
> quite a lot of decision tree logic, which I usually end up with quite a
> lot of these days. An elsewhile might also be cool.
You mean like this?
while not found:
line = fp.readline()
if not line: break
if re.search(pattern, line):
found = True
else:
print "we didn't find the pattern"
http://www.python.org/doc/current/tut/node6.html#SECTION006400000000000000000
Mike
--
Michael P. Soulier <msoulier at digitaltorque.ca>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort." -Harley Hahn, A Student's Guide to Unix
IM: msoulier at jabber.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20030627/6a59ada6/attachment.bin
More information about the OCLUG
mailing list