Python object overhead?

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Sun Mar 25 07:28:27 EDT 2007


Facundo Batista wrote:

> "not line" and "len(line) == 0" is the same as long as "line" is a
> string.
> 
> 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...

:)

Regards,


Björn 

-- 
BOFH excuse #378:

Operators killed by year 2000 bug bite.




More information about the Python-list mailing list