Naive Question

jim kraai jkraai at murl.com
Fri Dec 3 18:10:01 EST 1999


Greetings,

If I have:

class contrived_collection:
	def __init__(self):
		self.item = [{1,2},{3,4},{5,6}]

a = contrived_collection()
b = a.item[2]

How can I ask b what it is a member of?

I need to somehow know later in processing that:
1. b is a member of a.item
2. a.item is a member of a

Thanks,

--jim




More information about the Python-list mailing list