|
|
One of things I really like about python is the interactive interface and documentation. Being able to simply ask a member function for its documentation instead of going out and tracking it down is really nice. So I was quite disappointed when
using the DLR console that the objects.__doc__ feature were all empty. Am I missing something and/or is there an alternative way to easily get a member functions documentation.
|
|
Coordinator
Jun 23, 2009 at 11:36 PM
|
Ben,
Currently in SL this only works for Python code. So this would work in DLRConsole:
py> def foo():
py| "this is a doc string"
py> foo.__doc__
'this is a doc string'
However, build-in types (not written in Python, written in C#) depend on the doc strings to be either in a custom attribute or in IronPython.Modules.xml.
The transition is to have everything in the XML file, but it's not there yet. Also, I don't know if that logic if #ifdef'd out of Silverlight builds, but nothing's technically stopping it from working. I've opened a work-item against Python
http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23215.
|
|