Greg Ewing <[EMAIL PROTECTED]> 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 side-effects. > > 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.
I believe what he meant was that property change should not affect the state of anything but the *Python*'s object. Giovanni Bajo _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
