Why is dictionary.keys() a list and not a set?
Christoph Zwerschke
cito at online.de
Thu Nov 24 15:29:38 EST 2005
Alex Martelli wrote:
> An alternative theory, of course, is "God made the natural numbers; all
> else is the work of man" -- and that one is by a German, too (Kronecker,
> if I recall correctly).
Yes, it was Kronecker. But even natural numbers are usually constructed
with sets using Peano's axioms.
> The hope to found all of mathematics on set theory was primarily a
> _British_ effort, as I see it (Russell and Whitehead), and failed a
> long time ago... I'm not sure what, if anything, a mathematician of
> today would propose as the foundational theory...
Perhaps "string theory" ;-) So probably strings should become the
fundamental datatype in Python (immutable strings of course) :-)
> But OO really requires a different mindset, particularly when operating
> under a regime of "mutable" objects. "A circle IS-AN ellipse" in
> Euclidean geometry... but inheriting Circle from Ellipse doesn't work in
> OO if the objects are changeable, since you can, e.g., change
> eccentricity in an Ellipse but not in a Circle...
Good example.
-- Christoph
More information about the Python-list
mailing list