eof

greg greg at cosc.canterbury.ac.nz
Fri Nov 23 03:06:07 EST 2007


Hendrik van Rooyen wrote:
> So he can't even help himself by setting his
> own EOF attribute to False initially, and
> to True when he sees an empty string.
> 
> Is there a reason for this Bondage style?

There's a fair amount of overhead associated with providing
the ability to set arbitrary attributes on an object, which
is almost never wanted for built-in types, so it's not
provided by default.

You can easily get it if you want it by defining a Python
subclass of the type concerned.

--
Greg



More information about the Python-list mailing list