Fredrik Lundh <[EMAIL PROTECTED]> wrote: >Sion Arrowsmith wrote: >> What I've not seen documented anywhere is the: >> @property >> def fset(self, value): >> ... >> idiom. It's not obvious from the documentation of the property >> function that it can be used as a decorator like this. >probably because it cannot be used in that way: the "property" function >takes the *getter* as its first argument, so you can only use this for read- >only properties...
Ahem. Yes. What I obviously meant to write was: What I've not seen documented anywhere is the: @property def fget(self): ... idiom. [ ... ] (As correctly written by someone else further upthread.) It is possible to find it described by Googling, but the Cookbook (and python.org) hits provide much more complicated general-purpose (ie setters as well) property decorators. -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ ___ | "Frankly I have no feelings towards penguins one way or the other" \X/ | -- Arthur C. Clarke her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- http://mail.python.org/mailman/listinfo/python-list