davidhalter/jedi — pull request #141 by tkf (2013-02-24 19:27:03+00:00)
Title: Attribute docstring support

I am trying to support (part of) #138.

Changes:
- `Statement` now has `docstr` slot.
It is assigned at parse-time.
- `Name.docstr` returns parent's `docstr`.

It doesn't work at the level of `Scope.definition` though. `evaluate.follow_statement` follows path so that there is no way to access intermediate statements. I guess you need to find a way to "merge" all intermediate attribute docstrings.

The problem is that how to determine the docstring for `y` in the following case. And how to access the attribute docstring when following the assignments.
```py
def func():
"""original docstring"""

x = func
"""attribute docstring 1"""

y = x
"""attribute docstring 2"""
```