On 10/31/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > @property > > def encoding(self): > > return self._encoding > > > > @propset(encoding) > > def encoding(self, value=None): > > if value is not None: > > unicode("0", value) # Test it > > self._encoding = value > > That's reasonably nice, although I'm not sure about the > name "propset" -- it sounds like a repair kit for an > aircraft. Maybe something like "setproperty" would be > better.
I'm open for a naming contest. > But there's something that bothers me about the whole > propery mechanism -- there's no straightforward way for > a property accessor to call the inherited version from > a base class. Isn't there? You can just use super() ISTR, though I haven't had the need myself and don't recall the exact syntax. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com