[Docstring-develop] pydps - name/value annotation added
Status: Pre-Alpha
Brought to you by:
goodger
From: Tony J I. (Tibs) <to...@ls...> - 2001-09-18 12:51:57
|
As ever: http://www.tibsnjoan.co.uk/reST/pydps.tgz This lunchtime's work is to change how names are handled, such that the HTML can report on what a name is *set to*. This is (obviously!) limited in usefulness, and can only be done if the name is assigned to exactly once at the particular level it "belongs to". Amendment by methods and functions will, of course, not be seen. Look at html/html.py for an example of what this looks like. It *can* be misleading, as if one does:: a = 1 b = a a = 2 c = a you will get "a" reported with no value (since it has more than one assignment), but "b" and "c" both reported as being assigned "a", despite the fact their values are different. It may be that more of the reports need suppressing. On the other hand, if one is doing:: def __init__(self): self.postfix = 0 then being told that "self.postfix = 0" is quite useful... (and yes, I *know* I'm reporting names in places that DPS doesn't want me to, but information suppression isn't coded yet) (note for anyone reading the code (yuck) that the *old* method is still in there as well, and also that the *gathering* of this information is, erm, rather inefficient since it's done by yet another scan of the AST) Tibs -- Tony J Ibbs (Tibs) http://www.tibsnjoan.co.uk/ .. "equal" really means "in some sense the same, but maybe not .. the sense you were hoping for", or, more succinctly, "is .. confused with". (Gordon McMillan, Python list, Apr 1998) My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.) |