News for hackers. Stuff that matters.
Re:No-op statements syntactically valid only since Python X.Y by 8organicbits on Monday June 06, 2022 @09:40AM (#31640296)
I don't think I follow the stderr comment. Isn't it just:

Perl

    print STDERR "foo"
Python

    print(file=sys.stderr, "foo")
Those look fairly similar. I prefer that print() is obviously a function call and file is a named parameter so the purpose is clear.
Re:No-op statements syntactically valid only since Python X.Y by tus666 on Monday June 06, 2022 @03:38PM (#31645039)
Well in Perl there is...

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...

Re:No-op statements syntactically valid only since Python X.Y by tyingq on Monday June 06, 2022 @09:44AM (#31640341)
The file=sys.stderr came with Python 3. Because of that, I tend to see sys.stderr.write("foo\n") more often.
Re:No-op statements syntactically valid only since Python X.Y by jerdfelt on Monday June 06, 2022 @11:45AM (#31641964)
Python 2 was even more terse with it's print statement

    print >>sys.stderr, "foo"