En Tue, 29 Apr 2008 01:29:40 -0300, George Sakkis
<[EMAIL PROTECTED]> escribió:
On Apr 28, 10:59 pm, "Gabriel Genellina"
def property_default(prop_name, default_value=None, doc=None):
attr_name = '_'+prop_name
def fget(self, attr_name=attr_name,
default_value=de
On Apr 28, 10:59 pm, "Gabriel Genellina"
> def property_default(prop_name, default_value=None, doc=None):
>
> attr_name = '_'+prop_name
>
> def fget(self, attr_name=attr_name,
> default_value=default_value):
> return getattr(self, attr_name, default_value)
>
En Mon, 28 Apr 2008 14:35:40 -0300, cyril giraudon
<[EMAIL PROTECTED]> escribió:
Hello,
I try to use python descriptors to define attributes with default
value (the code is reported below).
But apparently, it breaks the docstring mechanism.
help(Basis) shows the right help but help(Rectangle
A precision, I use python 2.5.2 under linux mandiva 2007.0
Cyril.
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I try to use python descriptors to define attributes with default
value (the code is reported below).
But apparently, it breaks the docstring mechanism.
help(Basis) shows the right help but help(Rectangle) shows only two
lines :
"
Help on class Rectangle in module basis2:
Rectangle =
"
I