@@ -183,8 +183,8 @@ kd.dir(e) # ['x', 'y']
183183# Or
184184# As all entities share the same schema,
185185# the intersection of attribute names is the same
186- e .get_attr_names(intersection = True ) # ['x', 'y']
187- e .get_attr_names(intersection = False ) # ['x', 'y']
186+ kd .get_attr_names(e, intersection = True ) # ['x', 'y']
187+ kd .get_attr_names(e, intersection = False ) # ['x', 'y']
188188
189189# Access attribute
190190e.x # 1
@@ -406,8 +406,8 @@ os1 = kd.slice([kd.obj(x=1), kd.obj(x=1.0, y='a')])
406406# Attributes present in all objects
407407kd.dir(os1) # ['x']
408408# Or
409- os1 .get_attr_names(intersection = True ) # ['x']
410- os1 .get_attr_names(intersection = False ) # ['x', 'y']
409+ kd .get_attr_names(os1, intersection = True ) # ['x']
410+ kd .get_attr_names(os1, intersection = False ) # ['x', 'y']
411411
412412# Access attribute
413413o.x # 1
@@ -2836,15 +2836,15 @@ obj = kd.obj(x=1, y=kd.obj(z=1))
28362836# Create a obj stub without attributes
28372837obj2 = obj.stub()
28382838assert obj2.get_itemid() == obj.get_itemid()
2839- assert not obj2 .get_attr_names(intersection = False ) # []
2839+ assert not kd .get_attr_names(obj2, intersection = False ) # []
28402840
28412841# Create a list stub with list item stubs
28422842l = kd.list([kd.obj(x = 1 ), kd.obj(x = 2 )])
28432843l2 = l.stub()
28442844assert l2.get_itemid() == l.get_itemid()
28452845# List items are stubbed as well
28462846assert kd.agg_all(l2[:] == l[:])
2847- assert not l2[:].get_attr_names( intersection = False ) # []
2847+ assert not kd.get_attr_names( l2[:], intersection = False ) # []
28482848
28492849# Create a dict stub without entries
28502850d = kd.dict({' a' : kd.obj(x = 1 ), ' b' : kd.obj(x = 2 )})
0 commit comments