Re: [Python-3000] None in Comparisons

2008-11-12 Thread Greg Ewing
Marcin 'Qrczak' Kowalczyk wrote: 2008/11/11 Greg Ewing <[EMAIL PROTECTED]>: It would be possible to implement this convention in the sort method Until someone wishes to sort a list of some objects by key, where the keys can be (1, None) compared with (1, 3). Yes, I thought of that shortly a

Re: [Python-3000] None in Comparisons

2008-11-12 Thread Nick Coghlan
Bruce Leban wrote: > > > On Tue, Nov 11, 2008 at 2:00 PM, Greg Ewing <[EMAIL PROTECTED] > > wrote: > > M.-A. Lemburg wrote: > > On 2008-11-11 14:28, Antoine Pitrou wrote: > > But why should "n/a" (or "missing", or "undefined") imply >

Re: [Python-3000] None in Comparisons

2008-11-12 Thread Marcin 'Qrczak' Kowalczyk
2008/11/11 Greg Ewing <[EMAIL PROTECTED]>: > It would be possible to implement this convention in the > sort method, without making it a feature of comparisons > in general. Until someone wishes to sort a list of some objects by key, where the keys can be (1, None) compared with (1, 3). This will

Re: [Python-3000] None in Comparisons

2008-11-12 Thread Bruce Leban
On Tue, Nov 11, 2008 at 2:00 PM, Greg Ewing <[EMAIL PROTECTED]>wrote: > M.-A. Lemburg wrote: > >> On 2008-11-11 14:28, Antoine Pitrou wrote: >> >> But why should "n/a" (or "missing", or "undefined") imply "smaller than >>> everything else"? >>> >> >> It's just a convention based on viewing None a

Re: [Python-3000] None in Comparisons

2008-11-12 Thread Guido van Rossum
On Tue, Nov 11, 2008 at 10:20 AM, Tim Peters <[EMAIL PROTECTED]> wrote: > [M.-A. Lemburg] >> ... >> That's fine. I'm just talking about the special case for None that >> has existed in Python for years - and for a good reason. > > That's overstating it a bit ;-) In Python 1.5.1, comparisons were >

Re: [Python-3000] None in Comparisons: None vs. float("inf")

2008-11-12 Thread Antoine Pitrou
M.-A. Lemburg egenix.com> writes: > > The difference is that None is a singleton, so the set of all > None type instances is {None}. You always have an intuitive total order > relation on one element sets: the identity relation. But it's not what you are asking for. You are asking for None to su

Re: [Python-3000] Status of the email package ? (or: email package and unicode)

2008-11-12 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Nov 12, 2008, at 8:36 AM, Victor Stinner wrote: poplib, imaplib and nntplib are fixed in Python 3.0rc2, cool. I tested the smtplib module. It looks like .sendmail() requires an ASCII message (7 bits). I tried to use the email package to enco

[Python-3000] Status of the email package ? (or: email package and unicode)

2008-11-12 Thread Victor Stinner
Hi, poplib, imaplib and nntplib are fixed in Python 3.0rc2, cool. I tested the smtplib module. It looks like .sendmail() requires an ASCII message (7 bits). I tried to use the email package to encode my message. But the problem is that I'm unable to use characters different not in the ASCII ch

Re: [Python-3000] None in Comparisons

2008-11-12 Thread Greg Ewing
M.-A. Lemburg wrote: The difference is that None is a singleton, so the set of all None type instances is {None}. You always have an intuitive total order relation on one element sets: the identity relation. I don't see this having much practical consequence, though, since sorting members of a

Re: [Python-3000] None in Comparisons

2008-11-12 Thread M.-A. Lemburg
On 2008-11-12 00:09, Antoine Pitrou wrote: > M.-A. Lemburg egenix.com> writes: > None > None >> Traceback (most recent call last): >> File "", line 1, in >> TypeError: unorderable types: NoneType() > NoneType() > None != None >> False >> >> Two values that compare equal to each other (a

Re: [Python-3000] None in Comparisons

2008-11-12 Thread M.-A. Lemburg
On 2008-11-11 19:20, Tim Peters wrote: > [M.-A. Lemburg] >> ... >> That's fine. I'm just talking about the special case for None that >> has existed in Python for years - and for a good reason. > > That's overstating it a bit ;-) In Python 1.5.1, comparisons were > changed so that objects of nume