on 18.10.2005 19:17 Antoine Pitrou said the following:
What would this mythical block statement look like that would make
properties easier to write than the above late-binding or the subclass
Property recipe?
I suppose something like:
class C(object):
x = prop:
Yay for
Stefan Rank [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]:
I think there is no need for a special @syntax for this to work.
I suppose it would be possible to allow a trailing block after any
function invocation, with the effect of creating a new namespace that
gets treated as
What would this mythical block statement look like that would make
properties easier to write than the above late-binding or the subclass
Property recipe?
I suppose something like:
class C(object):
x = prop:
Yay for property x!
def __get__(self):
return
Le mardi 18 octobre 2005 à 19:17 +0200, Antoine Pitrou a écrit :
What would this mythical block statement look like that would make
properties easier to write than the above late-binding or the subclass
Property recipe?
I suppose something like:
class C(object):
x = prop:
Le mardi 18 octobre 2005 à 12:56 -0700, Josiah Carlson a écrit :
You are saving 3 lines over the decorator/function approach [...]
Well, obviously, the point of a block statement or construct is that it
can be applied to many other things than properties. Otherwise it is
overkill as you imply.