I really like the Python concept of docstring. Here is an example
class MyClass(object): """ Here I document the class """
Which is no different than the xml stuff we have in .net except that in Python, I can now do the following:
print MyClass.__doc__ #which prints "Here I document the class"
Cool, I wish this was that easy in .net. We are already doing some pretty crazy stuff with reflection in .net, add this to the mix and we could really enhance the way we do self documenting code.
Some further reading for those interested:
- http://en.wikipedia.org/wiki/Docstring
- http://www.python.org/dev/peps/pep-0257/
- http://www.python.org/dev/peps/pep-0287/ (an enhancement to docstring) which led to the creation of http://rtfd.org