Re: [Python-3000] Comparing to None

2008-02-01 Thread Raymond Hettinger
[GvR] > I expect that, given the general trend that different types are not > comparable, making an exception for None is more likely a source of > errors than a source of joy. That is reasonable. Raymond ___ Python-3000 mailing list Python-3000@python

Re: [Python-3000] Comparing to None

2008-02-01 Thread Guido van Rossum
On Feb 1, 2008 6:04 PM, Talin <[EMAIL PROTECTED]> wrote: > I would like to present an argument both for and against the proposal. > > Against: I've never personally needed this capability. > > For: In many languages, the 'null' value has a special polymorphic > behavior in that it is considered a s

Re: [Python-3000] Comparing to None

2008-02-01 Thread Talin
I would like to present an argument both for and against the proposal. Against: I've never personally needed this capability. For: In many languages, the 'null' value has a special polymorphic behavior in that it is considered a subtype of all reference types. Thus in C, you can assign NULL to

Re: [Python-3000] Set literal

2008-02-01 Thread Stephen J. Turnbull
Greg Ewing writes: > Also, if generator expressions had come first, we > would probably never have gotten list comprehensions. I don't understand. A list comprehension is for when you know you're going to want to work with the whole list. Similarly (even more so) for dictionary comprehensions

Re: [Python-3000] Comparing to None

2008-02-01 Thread Guido van Rossum
On Feb 1, 2008 5:18 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > You should have been there when this was decided about two years ago. > > IIRC, the decision was a general one about cross-type > comparisons not being turned-on the default. I do not > recall a specific discussion about None

Re: [Python-3000] Comparing to None

2008-02-01 Thread Raymond Hettinger
> You should have been there when this was decided about two years ago. IIRC, the decision was a general one about cross-type comparisons not being turned-on the default. I do not recall a specific discussion about None. Also, the list at the time was flooded with propositions ranging from the

Re: [Python-3000] Set literal

2008-02-01 Thread Guido van Rossum
On Feb 1, 2008 4:07 PM, Greg Ewing <[EMAIL PROTECTED]> wrote: > Not necessarily. We don't have dict comprehensions, and We don't? bash-3.2$ ./python.exe Python 3.0a2+ (py3k:60207, Jan 22 2008, 16:58:59) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license"

Re: [Python-3000] Comparing to None

2008-02-01 Thread Guido van Rossum
You should have been there when this was decided about two years ago. I really don't want to be tweaking the language spec continuously between now and the planned release date in ~August. On Feb 1, 2008 3:56 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > It was very convenient in Py2.x to ha

Re: [Python-3000] Set literal

2008-02-01 Thread Greg Ewing
Nicko van Someren wrote: > Do we really want set literals at all, given that set(...) exists? > > If we are going to have one then, it seems to make sense to have both. Not necessarily. We don't have dict comprehensions, and I don't remember there being many complaints about that. Also, if gen

[Python-3000] Comparing to None

2008-02-01 Thread Raymond Hettinger
It was very convenient in Py2.x to have None comparable to other types and always rank less than any other type. I would like to restore that ability. One example, it helps with heaps to be able to turn an entry into None and have it sift to the top where the null entries can be popped-off. R

Re: [Python-3000] Set literal

2008-02-01 Thread Nicko van Someren
On 30 Jan 2008, at 23:17, Greg Ewing wrote: > Nicko van Someren wrote: >> Personally I'd like set comprehensions to give me mutable sets, >> and so I feel set literals should do the same. > > Do you really want set comprehensions at all, given that > set(genexp) exists? Do we really want set l