[Python-ideas] Variable-length, homogeneous tuple: why?
Bruce Leban
bruce at leban.us
Sun Aug 17 18:54:23 CEST 2014
On Sun, Aug 17, 2014 at 3:53 AM, Ben Finney <ben+python at benfinney.id.au>
wrote:
> A homogeneous sequence would imply there are deliberately *no* specific
> meanings to each position.
>
That's a set. A sequence implies order matters in some way.
> The value 7.03 would have the same semantic
> value at any position in the sequence.
>
Not at all. The 7 implies a units value, the 0 is a tenths value and the 3
is the hundredths. Those are different semantics. In Roman numerals before
they invented subtraction, XVI = VIX so order did not matter. Roman
numerals were basically sets of numbers to be added.
Here's another: (KentuckyDerby, PreaknessStakes, BelmontStakes) -- these
three objects are all instances of the class StakesRace and the order is
significant.
--- Bruce
Learn how hackers think: http://j.mp/gruyere-security
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140817/df9204c7/attachment.html>
More information about the Python-ideas
mailing list