Re: [Python-Dev] Sets are mappings?

2005-12-22 Thread Nick Coghlan
Aahz wrote: On Wed, Dec 21, 2005, Michael Chermside wrote: So I have a counter-proposal. Let's NOT create a hierarchy of abstract base types for the elementary types of Python. (Even basestring feels like a minor wart to me, although for now it seems like we need it.) If the core problem is

Re: [Python-Dev] Sets are mappings?

2005-12-22 Thread Michael Hudson
Michael Chermside [EMAIL PROTECTED] writes: So I have a counter-proposal. Let's NOT create a hierarchy of abstract base types for the elementary types of Python. +1 Cheers, mwh -- bruce how are the jails in israel? itamar well, the one I was in was pretty nice

Re: [Python-Dev] Sets are mappings?

2005-12-21 Thread Nick Coghlan
Aahz wrote: On Tue, Dec 20, 2005, M.-A. Lemburg wrote: Josiah Carlson wrote: New superclasses for all built-in types (except for string and unicode, which already subclass from basestring). int, float, complex (long) : subclass from basenumber tuple, list, set : subclass from basesequence

Re: [Python-Dev] Sets are mappings?

2005-12-21 Thread Michael Chermside
Josiah Carlson writes: New superclasses for all built-in types (except for string and unicode, which already subclass from basestring). int, float, complex (long) : subclass from basenumber tuple, list, set : subclass from basesequence dict : subclass from basemapping The idea is that each

Re: [Python-Dev] Sets are mappings?

2005-12-21 Thread Nick Coghlan
Michael Chermside wrote: Nick Coghlan writes: Close enough to on-topic to stay here, I think. However, I tend to think of the taxonomy as a little less flat: basecontainer (anything with __len__) - set - basemapping (anything with __getitem__) - dict - basesequence

Re: [Python-Dev] Sets are mappings?

2005-12-21 Thread Michael Chermside
Nick Coghlan writes: Sorry - I meant to indicate that I didn't think the base classes were necessary because the relevant checks already existed in a does it behave like one sense: def is_container(x): [...] def is_mapping(x): [...] def is_sequence(x): [...]

Re: [Python-Dev] Sets are mappings?

2005-12-21 Thread Aahz
On Wed, Dec 21, 2005, Michael Chermside wrote: So I have a counter-proposal. Let's NOT create a hierarchy of abstract base types for the elementary types of Python. (Even basestring feels like a minor wart to me, although for now it seems like we need it.) If the core problem is how do you

[Python-Dev] Sets are mappings?

2005-12-20 Thread Aahz
On Tue, Dec 20, 2005, M.-A. Lemburg wrote: Josiah Carlson wrote: New superclasses for all built-in types (except for string and unicode, which already subclass from basestring). int, float, complex (long) : subclass from basenumber tuple, list, set : subclass from basesequence dict :

Re: [Python-Dev] Sets are mappings?

2005-12-20 Thread M.-A. Lemburg
Aahz wrote: On Tue, Dec 20, 2005, M.-A. Lemburg wrote: Josiah Carlson wrote: New superclasses for all built-in types (except for string and unicode, which already subclass from basestring). int, float, complex (long) : subclass from basenumber tuple, list, set : subclass from basesequence