Jul. 5th, 2005

sawyl: (Default)
Thankfully, I've fiddled with Emacs on Aqua and now I've got an electric slash in my minibuffer. Ooh err, missus.
sawyl: (Default)
In general, Python's refusal to treat an assignment as an expression is a Good Thing, cuz it prevents the dumb "if ( $x = "yes" ) { }" type errors that are oh so easy in Perl, C, whatever. Unfortunately, it makes the task of writing a text chomper a bit of a chore, since it's not possible to write:

for line in open("input").readlines(): if m = re.match("foo(\\d+)", line): print m.group(1) elif m = re.match("bar([a-z]+)", line): print m.group(1)

Read more... )

Profile

sawyl: (Default)
sawyl

August 2018

S M T W T F S
   123 4
5 6 7 8910 11
12131415161718
192021222324 25
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 15th, 2025 07:09 am
Powered by Dreamwidth Studios