# HG changeset patch # User Paul Boddie # Date 1342221857 -7200 # Node ID 86cfd34651614b1a866acd960fba1305a8338b84 # Parent bb68d90e1d65df6454be52ef03bdc7627a366f34 Added some comments. diff -r bb68d90e1d65 -r 86cfd3465161 micropython/common.py --- a/micropython/common.py Sat Jul 14 01:24:06 2012 +0200 +++ b/micropython/common.py Sat Jul 14 01:24:17 2012 +0200 @@ -75,6 +75,10 @@ target_names = set() + # Where an attribute could already be detected and where its nature is + # not that of a general instance or an unresolved name, attempt to + # identify it. + if hasattr(node, "_attr") and not isinstance(node._attr, (Instance, UnresolvedName)): attr = node._attr if isinstance(attr, Attr): @@ -82,6 +86,8 @@ else: target_names.add((attr.full_name(), attr.is_static_attribute())) + # Otherwise, attempt to employ the attribute usage observations. + elif hasattr(node, "_attrusers"): # Visit each attribute user.