[IronPython] Classes don't have doc strings
Anthony Tarlano
mailinglist.account at gmail.com
Thu May 19 09:41:34 CEST 2005
John,
It's a known bug. You should think about adding your comment to the existing
__doc__ bug over at GDN.
http://gotdotnet.com/workspaces/bugtracker/bugdetails.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742&bugid=9c2b6240-5c85-4155-8ecb-d072e7ad899e
Anthony
On 5/19/05, John Doty <jddoty at gmail.com> wrote:
>
> I have noticed that python-defined classes don't have doc strings.
>
> foo.py:
>
> class foo(object):
> "Test one two"
> def __init__(self):
> pass
>
> >>> import foo
> >>> print foo.foo.__doc__
> IronPython.Objects.PythonAttributeError: type object 'foo' has no
> attribute '__doc__'
> at IronPython.Objects.Ops.GetAttr(Object o, String name)
> at input_1.Run(Frame frame)
> at IronPython.Hosting.PythonEngine.DoOneInteractive(Frame topFrame)
> at IronPython.Hosting.PythonEngine.RunInteractive()
> >>>
>
> Is this known?
>
> I modified the code gen for classes to emit a __doc__ member when it
> finds a doc string in the body, in a manner similar to the way it is
> done for functions. (But I have a feeling I've done it wrong, because
> I don't entirely understand the way the code gen works right now.)
>
> thanks,
> john
> _______________________________________________
> users-ironpython.com <http://users-ironpython.com> mailing list
> users-ironpython.com at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20050519/00a171e4/attachment.html>
More information about the Ironpython-users
mailing list