Lines Matching refs:attrs
737 def spill(msg, attrs, predicate):
738 ok, attrs = _split_list(attrs, predicate)
753 return attrs
755 def spilldescriptors(msg, attrs, predicate):
756 ok, attrs = _split_list(attrs, predicate)
762 return attrs
764 def spilldata(msg, attrs, predicate):
765 ok, attrs = _split_list(attrs, predicate)
784 return attrs
786 attrs = filter(lambda data: visiblename(data[0], obj=object),
789 for key, kind, homecls, value in attrs:
804 while attrs:
808 thisclass = attrs[0][2]
809 attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)
812 attrs = inherited
821 # Sort attrs by name.
823 attrs.sort(key=lambda t: t[0])
825 attrs.sort(lambda t1, t2: cmp(t1[0], t2[0])) # 2.3 compat
827 # Pump out the attrs, segregated by kind.
828 attrs = spill('Methods %s' % tag, attrs,
830 attrs = spill('Class methods %s' % tag, attrs,
832 attrs = spill('Static methods %s' % tag, attrs,
834 attrs = spilldescriptors('Data descriptors %s' % tag, attrs,
836 attrs = spilldata('Data and other attributes %s' % tag, attrs,
838 assert attrs == []
839 attrs = inherited
1170 def spill(msg, attrs, predicate):
1171 ok, attrs = _split_list(attrs, predicate)
1185 return attrs
1187 def spilldescriptors(msg, attrs, predicate):
1188 ok, attrs = _split_list(attrs, predicate)
1194 return attrs
1196 def spilldata(msg, attrs, predicate):
1197 ok, attrs = _split_list(attrs, predicate)
1209 return attrs
1211 attrs = filter(lambda data: visiblename(data[0], obj=object),
1213 while attrs:
1217 thisclass = attrs[0][2]
1218 attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)
1221 attrs = inherited
1229 # Sort attrs by name.
1230 attrs.sort()
1232 # Pump out the attrs, segregated by kind.
1233 attrs = spill("Methods %s:\n" % tag, attrs,
1235 attrs = spill("Class methods %s:\n" % tag, attrs,
1237 attrs = spill("Static methods %s:\n" % tag, attrs,
1239 attrs = spilldescriptors("Data descriptors %s:\n" % tag, attrs,
1241 attrs = spilldata("Data and other attributes %s:\n" % tag, attrs,
1243 assert attrs == []
1244 attrs = inherited