Re: [Python-Dev] need an SSH key removed

2006-08-04 Thread Aahz
On Fri, Aug 04, 2006, Tim Peters wrote: > [Brett Cannon] >> >> My [EMAIL PROTECTED] SSH key should be removed since my internship is now >> over. > > Thank you for being conscientious. While it feared death, your key > didn't complain about being deleted, and right before it vanished I > saw the

Re: [Python-Dev] need an SSH key removed

2006-08-04 Thread Tim Peters
[Brett Cannon] > My [EMAIL PROTECTED] SSH key should be removed since my internship is now > over. Thank you for being conscientious. While it feared death, your key didn't complain about being deleted, and right before it vanished I saw the most astonishing look of profound peace passing over it

[Python-Dev] need an SSH key removed

2006-08-04 Thread Brett Cannon
My [EMAIL PROTECTED] SSH key should be removed since my internship is now over.-Brett ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/arch

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Josiah Carlson
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Fri, 04 Aug 2006 11:23:10 -0700, Josiah Carlson <[EMAIL PROTECTED]> wrote: > >There's one problem with generating a warning for 2.5, and that is the > >same problem as generating a warning for possible packages that lack an > >__init__.py; users

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Ron Adam
M.-A. Lemburg wrote: > Terry Reedy wrote: >> "Michael Hudson" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> Michael Chermside <[EMAIL PROTECTED]> writes: >>> I'm changing the subject line because I want to convince everyone that the problem being discussed in the "un

Re: [Python-Dev] More tracker demos online

2006-08-04 Thread David Ascher
> ""Martin v. Löwis"" < [EMAIL PROTECTED]> wrote in message> news:[EMAIL PROTECTED]>> > Currently, we have two running tracker demos online:> >> > Roundup:> > http://efod.se/python-tracker/> >> > Jira:> > http://jira.python.atlassian.com/secure/Dashboard.jspa Is anyone looking at the Google Code H

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Paul Colomiets
Giovanni Bajo wrote: > Paul Colomiets <[EMAIL PROTECTED]> wrote: > > >> Well it's not recomended to mix strings and unicode in the >> dictionaries >> but if we mix for example integer and float we have the same thing. It >> doesn't raise exception but still it is not expected behavior for me: >>

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Bob Ippolito
On Aug 4, 2006, at 12:51 PM, Giovanni Bajo wrote: > Paul Colomiets <[EMAIL PROTECTED]> wrote: > >> Well it's not recomended to mix strings and unicode in the >> dictionaries >> but if we mix for example integer and float we have the same >> thing. It >> doesn't raise exception but still it is n

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Giovanni Bajo
Paul Colomiets <[EMAIL PROTECTED]> wrote: > Well it's not recomended to mix strings and unicode in the > dictionaries > but if we mix for example integer and float we have the same thing. It > doesn't raise exception but still it is not expected behavior for me: > >>> d = { 1.0: 10, 2.0: 20 } > t

Re: [Python-Dev] Dicts are broken ...

2006-08-04 Thread Nick Maclaren
Michael Hudson <[EMAIL PROTECTED]> wrote: > > I'd say it's more to do with __eq__. It's a strange __eq__ method > that raises an Exception, IMHO. Not entirely. Any type that supports invalid values (e.g. IEEE 754) and is safe against losing the invalid state by accident needs to raise an except

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Paul Colomiets
Hi! Terry Reedy wrote: > The fundamental axiom of sets and hence of dict keys is that any > object/value either is or is not a member (at any given time for 'mutable' > set collections). This requires that testing an object for possible > membership by equality give a clean True or False answe

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Jean-Paul Calderone
On Fri, 04 Aug 2006 11:23:10 -0700, Josiah Carlson <[EMAIL PROTECTED]> wrote: > >There's one problem with generating a warning for 2.5, and that is the >same problem as generating a warning for possible packages that lack an >__init__.py; users may start to get a bunch of warnings, and be unaware >

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Josiah Carlson
There's one problem with generating a warning for 2.5, and that is the same problem as generating a warning for possible packages that lack an __init__.py; users may start to get a bunch of warnings, and be unaware of how to suppress them. All in all though, I'm +0 on the warning, and +1 on it no

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Michael Chermside
Marc-Andre Lemburg writes: > How about generating a warning instead and then go for the exception > in 2.6 ? Agreed. Michael Hudson's explanation convinced me. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.o

Re: [Python-Dev] Python 2.5b3 and AIX 4.3 - It Works

2006-08-04 Thread Neal Norwitz
There is at least one outstanding bug report for test_mmap failing on AIX IIRC. Possibly another for test_resource. Please review bug reports and file new ones/update old ones with the current status. Unless if you provide patches, they probably won't be fixed though. No one has access to AIX AFA

Re: [Python-Dev] uuid module - byte order issue

2006-08-04 Thread Ka-Ping Yee
On Thu, 3 Aug 2006, Oren Tirosh wrote: > The UUID module uses network byte order, regardless of the platform > byte order. On little-endian platforms like Windows the ".bytes" > property of UUID objects is not compatible with the memory layout RFC 4122 says: In the absence of explicit applica

[Python-Dev] Python 2.5b3 and AIX 4.3 - It Works

2006-08-04 Thread Michael Kent
Because of a requirement to remain compatible with AIX 4.3, I have been forced to stay with Python 2.3, because while 2.4 would compile under AIX 4.3, it would segfault immediately when run. I'm happy to report that Python 2.5b3 compiles and runs fine under AIX 4.3, and passes most of its test sui

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Aug 4, 2006, at 11:43 AM, M.-A. Lemburg wrote: > How about generating a warning instead and then go for the exception > in 2.6 ? From the perspective of wanting to avoid blog entries in 2007 railing against our gratuitous breakages in Python 2.

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread M.-A. Lemburg
Terry Reedy wrote: > "Michael Hudson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Michael Chermside <[EMAIL PROTECTED]> writes: >> >>> I'm changing the subject line because I want to convince everyone that >>> the problem being discussed in the "unicode hell" thread has nothin

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Terry Reedy
"Michael Hudson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Michael Chermside <[EMAIL PROTECTED]> writes: > >> I'm changing the subject line because I want to convince everyone that >> the problem being discussed in the "unicode hell" thread has nothing >> to do with unicode an

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Michael Hudson
Michael Chermside <[EMAIL PROTECTED]> writes: > I'm changing the subject line because I want to convince everyone that > the problem being discussed in the "unicode hell" thread has nothing > to do with unicode and strings. It's all about dicts. I'd say it's more to do with __eq__. It's a strang

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread Ralf Schmitt
Christopher Armstrong wrote: > On 8/4/06, *Ralf Schmitt* <[EMAIL PROTECTED] > > wrote: > > > Maybe this is all just a matter of choosing the right > defaultencoding ? :) > > > > Doing this is amazingly stupid. I can't believe how often I hear this > suggesti

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread Christopher Armstrong
On 8/4/06, Ralf Schmitt <[EMAIL PROTECTED]> wrote: Jean-Paul Calderone wrote:>> I like the exception that 2.5 raises.  I only wish it raised by default> when using 'ascii' and u'ascii' as keys in the same dictionary. ;)  Oh,> and that str and unicode did not hash like they do.  ;) No problem: >>> i

[Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Michael Chermside
I'm changing the subject line because I want to convince everyone that the problem being discussed in the "unicode hell" thread has nothing to do with unicode and strings. It's all about dicts. I have not observed real breakage in my own code, but I will present a sample of made-up-but-completely-

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionarykeys

2006-08-04 Thread Kristján V . Jónsson
The "string" isn´t necessarily text, so selecting latin-1 doesn´t help (in fact, what happens is that the current default encoding is used, in his case this was ascii). What if it is image data? What if you are using a dict to implement a singleton set for arbitrary objects? The point is tha

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread Bob Ippolito
On Aug 3, 2006, at 9:34 PM, Josiah Carlson wrote: > > Bob Ippolito <[EMAIL PROTECTED]> wrote: >> On Aug 3, 2006, at 6:51 PM, Greg Ewing wrote: >> >>> M.-A. Lemburg wrote: >>> Perhaps we ought to add an exception to the dict lookup mechanism and continue to silence UnicodeErrors ?! >>> >

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread M.-A. Lemburg
Ralf Schmitt wrote: > M.-A. Lemburg wrote: >> Ralf Schmitt wrote: >>> Does python 2.4 catch any exception when comparing keys (which are not >>> basestrings) in dictionaries? >> Yes. It does so for all equality compares that need to be done >> as part of the hash collision algorithm (not only w/r

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread M.-A. Lemburg
Greg Ewing wrote: > M.-A. Lemburg wrote: > >> If a string >> is not ASCII and thus causes the exception, there's not a lot you >> can say, since you don't know the encoding of the string. > > That's one way of looking at it. > > Another is that any string containing chars > 127 is not > text at

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread Michael Hudson
"M.-A. Lemburg" <[EMAIL PROTECTED]> writes: > The point here is that a typical user won't expect any comparisons > to be made when dealing with dictionaries, simply because the fact > that you do need to make comparisons is an implementation detail. Of course looking things up in a dictionary inv

Re: [Python-Dev] 2.5 status

2006-08-04 Thread Georg Brandl
Neal Norwitz wrote: > Things are getting better, but we still have some really important > outstanding issues. PLEASE CONTINUE TESTING AS MUCH AS POSSIBLE. > Also, it would be great to use as many tools as possible to find bugs > and improve quality. It would be especially nice to run Purify on >

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread Ralf Schmitt
M.-A. Lemburg wrote: > Ralf Schmitt wrote: >> Does python 2.4 catch any exception when comparing keys (which are not >> basestrings) in dictionaries? > > Yes. It does so for all equality compares that need to be done > as part of the hash collision algorithm (not only w/r to strings > and Unicode

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread Greg Ewing
M.-A. Lemburg wrote: > If a string > is not ASCII and thus causes the exception, there's not a lot you > can say, since you don't know the encoding of the string. That's one way of looking at it. Another is that any string containing chars > 127 is not text at all, but binary data, in which case

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread M.-A. Lemburg
Ralf Schmitt wrote: > Does python 2.4 catch any exception when comparing keys (which are not > basestrings) in dictionaries? Yes. It does so for all equality compares that need to be done as part of the hash collision algorithm (not only w/r to strings and Unicode, but in general). This was chan

Re: [Python-Dev] 2.5 status

2006-08-04 Thread M.-A. Lemburg
Neal Norwitz wrote: > I believe all 3 outstanding issues (and solutions!) could use some > more discussion. All bugs/patches blocking release are set to > priority 9. > > http://python.org/sf/1530559 - struct rejecting floats (patch pending) > > http://mail.python.org/pipermail/p

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread Ralf Schmitt
Jean-Paul Calderone wrote: > > I like the exception that 2.5 raises. I only wish it raised by default > when using 'ascii' and u'ascii' as keys in the same dictionary. ;) Oh, > and that str and unicode did not hash like they do. ;) No problem: >>> import sys >>> reload(sys) >>> sys.setdef

Re: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)

2006-08-04 Thread Greg Ewing
James Y Knight wrote: > And it does in C because C doesn't have arbitrary size integers, so if > round returned integers, round(1e+308) couldn't work. Also, in C you can use the result directly in an int context without complaint. In Python these days, that is usually disallowed. -- Greg _

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread Giovanni Bajo
M.-A. Lemburg <[EMAIL PROTECTED]> wrote: >> At the very least, in the context of a dictionary >> lookup. > > The point here is that a typical user won't expect any comparisons > to be made when dealing with dictionaries, simply because the fact > that you do need to make comparisons is an implemen

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread M.-A. Lemburg
Delaney, Timothy (Tim) wrote: > M.-A. Lemburg wrote: > >> Perhaps we ought to add an exception to the dict lookup mechanism >> and continue to silence UnicodeErrors ?! > > I'd definitely consider a UnicodeError to be an indication that two > objects are not equal. Not really: Python expects all