>>> Combining two integers lets you make a Rational. >> >> Ah, but what is going to group them together? You see you've already >> gotten seduced. Python already uses a set to group them together -- >> it's called a Dict and it's in every Class object. > > When you inherit a "set" to make a Rational, you're making the > statement (to the interpreter, if nothing else) that a Rational is-a > set.
No you don't *inherit* a set to make a Rational, although you gain a set to make it. It's a subtle thing, because at the center of it articulates the very difference between a piece of data and a container to hold that data. Or is the container the data? C++ already solves this di-lemma. It made "class" which is exactly like a "struct", but hides all it's data members. That critical distinction makes all the difference. I don't know how many people on the list really appreciate it. -- MarkJ Tacoma, Washington -- http://mail.python.org/mailman/listinfo/python-list