Perl
print STDERR "foo"
print(file=sys.stderr, "foo")
warn("foo")
In Python you have to at least:
- remember not to forget to import sys - remember the file= syntax for the print statement - type about 10 extra characters
Bunch of annoying stuff when you are hurriedly debugging something...
print >>sys.stderr, "foo"
Perl
Python Those look fairly similar. I prefer that print() is obviously a function call and file is a named parameter so the purpose is clear.