Python object overhead?
usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Sun Mar 25 13:28:27 CEST 2007
Facundo Batista wrote:
> "not line" and "len(line) == 0" is the same as long as "line" is a
> He's checking ok, 'cause a "blank line" has a lenght > 0 (because
> of newline).
Ah, K. Normally, I strip the read line and then test "if not line".
His check /is/ okay, but IMHO it's a little bit weird.
> Unless I understood it wrong, it's just an object that holds the
> line inside.
A Python string would technically be the same ;)
> Just OO purity, not practicality...
BOFH excuse #378:
Operators killed by year 2000 bug bite.
More information about the Python-list