Re: descriptor & docstring

2008-04-28 Thread Gabriel Genellina
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

Re: descriptor & docstring

2008-04-28 Thread George Sakkis
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) >

Re: descriptor & docstring

2008-04-28 Thread Gabriel Genellina
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

Re: descriptor & docstring

2008-04-28 Thread cyril giraudon
A precision, I use python 2.5.2 under linux mandiva 2007.0 Cyril. -- http://mail.python.org/mailman/listinfo/python-list

descriptor & docstring

2008-04-28 Thread cyril giraudon
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