Re: adding a docstring to an instancemethod

2007-07-27 Thread Steven D'Aprano
On Fri, 27 Jul 2007 06:24:48 -0300, Gabriel Genellina wrote: > En Thu, 26 Jul 2007 14:48:12 -0300, jelle <[EMAIL PROTECTED]> > escribió: > >> Hi Gabriella, >> thanks for pointing me in the right direction: > > Twice in a week... I'll have to revise my own masculinity... You need to spit and f

Re: adding a docstring to an instancemethod

2007-07-27 Thread Neil Cerutti
On 2007-07-27, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Thu, 26 Jul 2007 14:48:12 -0300, jelle <[EMAIL PROTECTED]> > escribió: > >> Hi Gabriella, >> thanks for pointing me in the right direction: > > Twice in a week... I'll have to revise my own masculinity... The trumpet shall sound!

Re: adding a docstring to an instancemethod

2007-07-27 Thread Gabriel Genellina
En Thu, 26 Jul 2007 14:48:12 -0300, jelle <[EMAIL PROTECTED]> escribió: > Hi Gabriella, > thanks for pointing me in the right direction: Twice in a week... I'll have to revise my own masculinity... -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: adding a docstring to an instancemethod

2007-07-26 Thread jelle
Hi Gabriella, thanks for pointing me in the right direction: eo.eoTruncatedSelectOne.setup.im_func.func_doc = 'method string goes here' works beautifully! cheers, -jelle -- http://mail.python.org/mailman/listinfo/python-list

Re: adding a docstring to an instancemethod

2007-07-26 Thread jelle
> Set the __doc__ on the *function* from which you build the instance method. Thanks for you reply Gabriel, Though setting the docstring to the functions wouldn't be an option for me. The thing is that I have a wrappedCppModule.Class.Method I'd like to give a docstring, so there's no prior funct

Re: adding a docstring to an instancemethod

2007-07-25 Thread Gabriel Genellina
En Wed, 25 Jul 2007 08:05:37 -0300, jelle <[EMAIL PROTECTED]> escribió: > I'm working on documenting wrapped C++ methods. > The thing is that I'd like to add docstrings to a method, but python > won't allow me to: > TypeError: attribute '__doc__' of 'instancemethod' objects is not > writable Se

adding a docstring to an instancemethod

2007-07-25 Thread jelle
Hi, I'm working on documenting wrapped C++ methods. The thing is that I'd like to add docstrings to a method, but python won't allow me to: TypeError: attribute '__doc__' of 'instancemethod' objects is not writable What would be an easy way to do so? I'd like to overload the .__doc__, rather than