Delaney, Timothy (Tim) wrote:
> A view is a lightweight object that implements an interface by
> delegating to an underlying object. The underlying object cannot be
> changed through the view, but could be changed directly, in which case
> the view will reflect the new contents of the object.
It certainly makes sense that views would *usually* be read-only, but is 
that really a *requirement*?  attrview(), recently discussed in 
Python-Dev, allowed changing the underlying object. See Martin v. 
Lowis's implementation of attrview() here:
    http://mail.python.org/pipermail/python-dev/2007-February/071044.html
It allowed setting attributes on the underlying object, like this:
    attrview(self)[method_name] = attrview(self.metadata)[method_name]

Cheers,


/larry/
_______________________________________________
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

Reply via email to