[Python-3000] iostack, continued
greg.ewing at canterbury.ac.nz
Wed Jun 7 03:05:10 CEST 2006
Giovanni Bajo wrote:
> About this part: "properties raising IOError", I would like to remember that
> Guido pronounced on The Way properties should be used in Py3k. Part of the
> pronouncement was that reading/writing properties should never have
That's meaningless without a definition of what counts as a
"side effect". Writing to a property must have *some* effect
on the state of something, otherwise it's pointless.
I'm guessing he meant it shouldn't affect the state of anything
outside that object. But then we need to decide what counts
as part of the state of a file object. Does it include the
value of the file position of the underlying file descriptor?
If it does, then file.position = foo is a legitimate usage
of a property.
More information about the Python-3000