On Wed, 21 Jun 2006 17:15:16 +0200, Maric Michaud wrote:
>
> In [53]: class a(object) :
> ....: x=property(lambda s: 0, doc='my doc string')
> ....:
> ....:
>
> In [54]: b=a()
>
> In [55]: help(b)
I agree it works, but for a class with tens of attributes, this is not
very practical.
> Also you can do something like that (put it in some startup script) :
>
>
> In [27]: __IPYTHON__.old_pinfo = __IPYTHON__.magic_pinfo
>
> In [28]: def new_pinfo(obj) :
> ....: return __IPYTHON__.old_pinfo('modified_version_of_obj')
> ....:
>
> In [29]: __IPYTHON__.magic_pinfo = new_pinfo
>
> But you can also send a bug report to Ipython maintainer :)
I looked into the internals of IPython and I can't say I understood much...
I think I'll follow your advice.
Has this problem come up before ? It seems that with the new classes, this
kind of wish will generalize, or is it a bad coding habit to embed
objects inside classes ?
Thanks
David
--
http://mail.python.org/mailman/listinfo/python-list