PEP 285: Adding a bool type

David Eppstein eppstein at ics.uci.edu
Sun Apr 7 11:53:49 EDT 2002


In article <ub0k49taktp243 at news.supernews.com>,
 "John Roth" <johnroth at ameritech.net> wrote:

> > By the way, this is conceptually very similar to ints (at least,
> > nonnegative ints): ints answer a specific question: how many things?
> > They do not answer the question: which things are they.
> 
> Not exactly. Consider the common case of 'take a number'
> played at various burocracies. The manager can tell how many
> there are by inspecting the next number on the roll, but each person
> waiting has his own number, and they can be called out of order.

I was talking about cardinal numbers, you're talking about ordinal 
numbers.

Ordinal numbers in programming are often used for converting objects 
into positions to look up data in an array.  They're less often needed 
in Python because we have dictionaries instead.

-- 
David Eppstein       UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/



More information about the Python-list mailing list