In article <[EMAIL PROTECTED]>,
"J. Clifford Dyer" <[EMAIL PROTECTED]> writes:
|> 
|> How about: "A heterogenous sequence is one in which each element plays a
|> unique role, specific to its position in the sequence.  A homogenous
|> sequence is one in which position is determinative of nothing
|> significant other than (perhaps) order."

Nope.  Sorry.  Consider the old model where an I/O list is an ordered
sequence of strings and agents (effectively procedure calls), with no
constraints on how those are ordered.  With your specification, that
is neither heterogenous nor homogenous :-)

|> I doubt the python interpreter will ever try to enforce
|> homogeneity/heterogeneity on lists/tuples, in part because there no good
|> ways of definining it syntactically, and in part because there are
|> certainly good reasons for breaking the rules.  As someone said: passing
|> lists to untrustworthy functions.  And as someone else said, *args
|> passes a tuple, even though it is frequently just a homogenous list of
|> more arguments.

It's a complete delusion, because even the claimed assumption of list
homogeneity is tantmount to saying that Python doesn't encourage (or,
arguably, support) ANY way of using mutable heterogenous sequences
(such as the example above).  To claim that they are inherently an
undesirable programming practice is a clear descent into religion!

I would be amused to know what Python type the "lists are intended to
be homogenous" people use to implement mutable heterogenous sequences,
or whether they claim that wanting such a feature is heresy :-)


Regards,
Nick Maclaren.


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to