Re: [Python-Dev] bytes type discussion

2006-02-16 Thread Jack Diederich
On Thu, Feb 16, 2006 at 06:13:53PM +0100, Fredrik Lundh wrote: > Barry Warsaw wrote: > > > We know at least there will never be a 2.10, so I think we still have > > time. > > because there's no way to count to 10 if you only have one digit? > > we used to think that back when the gas price was j

Re: [Python-Dev] str object going in Py3K

2006-02-16 Thread Guido van Rossum
On 2/16/06, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > What will be the explicit way to open a file in bytes mode > and in text mode (I for one would like to move away from > open() completely as well) ? > > Will we have a single file type with two different modes > or two different types ? I'm cu

Re: [Python-Dev] Adventures with ASTs - Inline Lambda

2006-02-16 Thread Steve Holden
Talin wrote: > First off, let me apologize for bringing up a topic that I am sure that > everyone is sick of: Lambda. > > I broached this subject to a couple of members of this list privately, > and I got wise feedback on my suggestions which basically amounted to > "don't waste your time." >

Re: [Python-Dev] bytes.from_hex() [Was: PEP 332 revival in coordination with pep 349?]

2006-02-16 Thread Josiah Carlson
Greg Ewing <[EMAIL PROTECTED]> wrote: > > Josiah Carlson wrote: > > > They may not be encodings of _unicode_ data, > > But if they're not encodings of unicode data, what > business do they have being available through > someunicodestring.encode(...)? I had always presumed that bytes objects ar

[Python-Dev] Test failures in test_timeout

2006-02-16 Thread Thomas Wouters
I'm seeing spurious test failures in test_timeout, on my own workstation and on macteagle.python.org (now that it crashes less; Apple sent over some new memory.) The problem is pretty simple: both macteagle and my workstation live too closely, network-wise, to www.python.org: class TimeoutTestCas

Re: [Python-Dev] str object going in Py3K

2006-02-16 Thread Martin v. Löwis
Greg Ewing wrote: > Another thought -- what is going to happen to os.open? > Will it change to return bytes, or will there be a new > os.openbytes? Nit-pickingly: os.open will continue to return integers. I think it should return OS handles on Windows, instead of C library handles. (also notice t

Re: [Python-Dev] Rename str/unicode to text [Was: Re: str object going in Py3K]

2006-02-16 Thread Guido van Rossum
On 2/16/06, Adam Olsen <[EMAIL PROTECTED]> wrote: > While we're at it, any chance of renaming str/unicode to text in 3.0? > It's a MUCH better name, as evidenced by the opentext/openbytes names. > str is just some odd C-ism. > > Obviously it's a form of gratuitous breakage, but I think the long >

Re: [Python-Dev] str object going in Py3K

2006-02-16 Thread Guido van Rossum
On 2/15/06, Alex Martelli <[EMAIL PROTECTED]> wrote: > I agree, or, MAL's idea of bytes.open() and unicode.open() is also > good. No, the bytes and text data types shouldn't have to be tied to the I/O system. (The latter tends to evolve at a much faster rate so should be isolated.) > My fondest d

Re: [Python-Dev] Rename str/unicode to text [Was: Re: str object goingin Py3K]

2006-02-16 Thread Fredrik Lundh
Adam Olsen wrote: > While we're at it, any chance of renaming str/unicode to text in 3.0? > It's a MUCH better name, as evidenced by the opentext/openbytes names. > str is just some odd C-ism. > > Obviously it's a form of gratuitous breakage, but I think the long > term benefits are enough that w

Re: [Python-Dev] str object going in Py3K

2006-02-16 Thread M.-A. Lemburg
Guido van Rossum wrote: > On 2/15/06, Alex Martelli <[EMAIL PROTECTED]> wrote: >> I agree, or, MAL's idea of bytes.open() and unicode.open() is also >> good. > > No, the bytes and text data types shouldn't have to be tied to the I/O > system. (The latter tends to evolve at a much faster rate so sh

Re: [Python-Dev] Proposal: defaultdict

2006-02-16 Thread Greg Ewing
Guido van Rossum wrote: > The first, required, argument to the > constructor should be the default value. I'd like to suggest that this argument be a function for creating default values, rather than an actual default value. This would avoid any confusion over exactly how the default value is copi

Re: [Python-Dev] Proposal: defaultdict

2006-02-16 Thread Delaney, Timothy (Tim)
Guido van Rossum wrote: > Over lunch with Alex Martelli, he proposed that a subclass of dict > with this behavior (but implemented in C) would be a good addition to > the language. It looks like it wouldn't be hard to implement. It could > be a builtin named defaultdict. The first, required, argum

Re: [Python-Dev] str object going in Py3K

2006-02-16 Thread Bengt Richter
On Wed, 15 Feb 2006 21:59:55 -0800, Alex Martelli <[EMAIL PROTECTED]> wrote: > >On Feb 15, 2006, at 9:51 AM, Barry Warsaw wrote: > >> On Wed, 2006-02-15 at 09:17 -0800, Guido van Rossum wrote: >> >>> Regarding open vs. opentext, I'm still not sure. I don't want to >>> generalize from the openbytes

[Python-Dev] Proposal: defaultdict

2006-02-16 Thread Guido van Rossum
A bunch of Googlers were discussing the best way of doing the following (a common idiom when maintaining a dict of lists of values relating to a key, sometimes called a multimap): if key not in d: d[key] = [] d[key].append(value) An alternative way to spell this uses setdefault(), but it's no

Re: [Python-Dev] from __future__ import unicode_strings?

2006-02-16 Thread Jean-Paul Calderone
On Thu, 16 Feb 2006 16:29:40 +0100, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: >Jean-Paul Calderone wrote: >> On Thu, 16 Feb 2006 11:24:35 +0100, "M.-A. Lemburg" <[EMAIL PROTECTED]> >> wrote: >>> Neil Schemenauer wrote: On Thu, Feb 16, 2006 at 02:43:02AM +0100, Thomas Wouters wrote: > On

Re: [Python-Dev] 2.5 PEP

2006-02-16 Thread Martin v. Löwis
Fredrik Lundh wrote: > http://mail.python.org/pipermail/python-dev/2005-December/058752.html > > "I don't agree with the change. You just broke source compatibility > between the core package and PyXML." I'm still unhappy with that change, and still nobody has told me how to maintain

Re: [Python-Dev] 2.5 - I'm ok to do release management

2006-02-16 Thread Guido van Rossum
On 2/15/06, Anthony Baxter <[EMAIL PROTECTED]> wrote: > I'm still catching up on the hundreds of python-dev messages from the > last couple of days, but a quick note first that I'm ok to do release > management for 2.5 Thanks! While catching up, yuo can ignore the bytes discussion except for Neil

Re: [Python-Dev] 2.5 - I'm ok to do release management

2006-02-16 Thread Tim Peters
[Anthony Baxter] > I'm still catching up on the hundreds of python-dev messages from the > last couple of days, but a quick note first that I'm ok to do release > management for 2.5 I, for one, am delighted to see that Australian millionaires don't give up tech work after winning an Olympic gold m

Re: [Python-Dev] PEP 338 issue finalisation (was Re: 2.5 PEP)

2006-02-16 Thread Paul Moore
On 2/16/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 2/16/06, Nick Coghlan <[EMAIL PROTECTED]> wrote: > > The PEP itself requests that a string be returned from get_data(), but > > doesn't > > require that the file be opened in text mode. Perhaps the PEP 302 emulation > > should use binar

Re: [Python-Dev] str object going in Py3K

2006-02-16 Thread Shane Holloway (IEEE)
On Feb 15, 2006, at 20:06, Greg Ewing wrote: > Barry Warsaw wrote: > >> If we go with two functions, I'd much rather hang them off of the >> file >> type object then add two new builtins. I really do think >> file.bytes() >> and file.text() (a.k.a. open.bytes() and open.text()) is better tha

Re: [Python-Dev] bytes type discussion

2006-02-16 Thread Fredrik Lundh
Barry Warsaw wrote: > We know at least there will never be a 2.10, so I think we still have > time. because there's no way to count to 10 if you only have one digit? we used to think that back when the gas price was just below 10 SEK/L, but they found a way... __

Re: [Python-Dev] from __future__ import unicode_strings?

2006-02-16 Thread M.-A. Lemburg
Jean-Paul Calderone wrote: > On Thu, 16 Feb 2006 11:24:35 +0100, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: >> Neil Schemenauer wrote: >>> On Thu, Feb 16, 2006 at 02:43:02AM +0100, Thomas Wouters wrote: On Wed, Feb 15, 2006 at 05:23:56PM -0800, Guido van Rossum wrote: >> from __fu

Re: [Python-Dev] from __future__ import unicode_strings?

2006-02-16 Thread M.-A. Lemburg
Giovanni Bajo wrote: > Thomas Wouters <[EMAIL PROTECTED]> wrote: > from __future__ import unicode_strings >>> Didn't we have a command-line option to do this? I believe it was >>> removed because nobody could see the point. (Or am I hallucinating? >>> After several days of non-stop discus

Re: [Python-Dev] nice()

2006-02-16 Thread Andrew Lentvorski
Smith wrote: > Everyone knows that fp numbers must be compared with caution, but > there is a void in the relative-error department for exercising such > caution, thus the proposal for something like 'areclose'. The problem > with areclose(), however, is that it only solves one part of the > proble

Re: [Python-Dev] Adventures with ASTs - Inline Lambda

2006-02-16 Thread Fredrik Lundh
Paul Moore wrote: > > > I definately don't want to start a flame war, although I suspect I already > > > have :/ > > > > I think most about everything has already been said wrt lambda already, > > but I guess we could have a little war on spelling issues ;-) > > Agreed, but credit to Talin for act

Re: [Python-Dev] [Python-projects] AST in Python 2.5

2006-02-16 Thread Nicolas Chauvat
On Wed, Feb 15, 2006 at 09:40:17PM -0800, Neal Norwitz wrote: > I'm not sure if anyone here is following the AST discussion on > python-dev, but it would be great if you had any input. pylint is a > pretty big consumer of the compiler module and the decisions with > respect to the AST could impact

Re: [Python-Dev] 2.5 PEP

2006-02-16 Thread Fredrik Lundh
> > (is the xmlplus/xmlcore issue still an issue, btw?) > > What issue are you talking about? the changes described here http://mail.python.org/pipermail/python-dev/2005-December/058710.html "I'd like to propose that a new package be created in the standard library: xmlcore." which

Re: [Python-Dev] Adventures with ASTs - Inline Lambda

2006-02-16 Thread Fredrik Lundh
Paul Moore wrote: > > I think most about everything has already been said wrt lambda already, > > but I guess we could have a little war on spelling issues ;-) > > Agreed, but credit to Talin for actually implementing his suggestion. > And it's nice to see that the AST makes this sort of experimen

Re: [Python-Dev] PEP 338 issue finalisation (was Re: 2.5 PEP)

2006-02-16 Thread Guido van Rossum
On 2/16/06, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > Do you have unit tests for everything? I believe I fixed a bug in the > > code that reads a bytecode file (it wasn't skipping the timestamp). [Hey, I thought I sent that just to you. Is python-dev really interested i

Re: [Python-Dev] from __future__ import unicode_strings?

2006-02-16 Thread Jean-Paul Calderone
On Thu, 16 Feb 2006 11:24:35 +0100, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: >Neil Schemenauer wrote: >> On Thu, Feb 16, 2006 at 02:43:02AM +0100, Thomas Wouters wrote: >>> On Wed, Feb 15, 2006 at 05:23:56PM -0800, Guido van Rossum wrote: >>> > from __future__ import unicode_strings

Re: [Python-Dev] C AST to Python discussion

2006-02-16 Thread Jeremy Hylton
On 2/16/06, Greg Ewing <[EMAIL PROTECTED]> wrote: > Whereas if there weren't any funky coding style in the > first place, more potential compiler hackers might be > encouraged to have a go. I'm trying to make the code simple. The style of code is different than other parts of Python, but a compil

Re: [Python-Dev] Adventures with ASTs - Inline Lambda

2006-02-16 Thread Nick Coghlan
Paul Moore wrote: > On 2/16/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >> Talin wrote: >>> I definately don't want to start a flame war, although I suspect I already >>> have :/ >> I think most about everything has already been said wrt lambda already, >> but I guess we could have a little war on

Re: [Python-Dev] Adventures with ASTs - Inline Lambda

2006-02-16 Thread Barry Warsaw
On Feb 16, 2006, at 2:05 AM, Talin wrote: > > Anyway, if anyone wants to play around with the patch, it is rather > small - a couple of lines in Grammar, and a small new function in > ast.c, > plus a few mods to other functions to get them to call it. The context > diff is less than two printed

[Python-Dev] Rename str/unicode to text [Was: Re: str object going in Py3K]

2006-02-16 Thread Adam Olsen
On 2/15/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 2/15/06, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > > Barry Warsaw wrote: > > > On Wed, 2006-02-15 at 18:29 +0100, M.-A. Lemburg wrote: > > > > > >> Maybe a weird idea, but why not use static methods on the > > >> bytes and str type objec

Re: [Python-Dev] 2.5 PEP

2006-02-16 Thread Nick Coghlan
Neal Norwitz wrote: > On 2/15/06, Alain Poirier <[EMAIL PROTECTED]> wrote: >> - isn't the current implementation of itertools.tee (cache of previous >> generated values) incompatible with the new possibility to feed a >> generator (PEP 342) ? > > I'm not sure what you are referring to.

Re: [Python-Dev] bytes type discussion

2006-02-16 Thread Adam Olsen
On 2/15/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Adam Olsen wrote: > > Making it an error to have 8-bit str literals in 2.x would help > > educate the user that they will change behavior in 3.0 and not be > > 8-bit str literals anymore. > > You would like to ban string literals from the l

[Python-Dev] PEP 338 issue finalisation (was Re: 2.5 PEP)

2006-02-16 Thread Nick Coghlan
Guido van Rossum wrote: > On 2/15/06, Nick Coghlan <[EMAIL PROTECTED]> wrote: >> PEP 338 is pretty much ready to go, too - just waiting on Guido's review and >> pronouncement on the specific API used in the latest update (his last PEP >> parade said he was OK with the general concept, but I only po

Re: [Python-Dev] from __future__ import unicode_strings?

2006-02-16 Thread M.-A. Lemburg
Neil Schemenauer wrote: > On Thu, Feb 16, 2006 at 02:43:02AM +0100, Thomas Wouters wrote: >> On Wed, Feb 15, 2006 at 05:23:56PM -0800, Guido van Rossum wrote: >> from __future__ import unicode_strings >>> Didn't we have a command-line option to do this? I believe it was >>> removed because

Re: [Python-Dev] C AST to Python discussion

2006-02-16 Thread Greg Ewing
Brett Cannon wrote: > If the compiler was hacked on by more people I would agree with this. > But few people do This has the potential to be a self-perpetuating situation. There may be few people hacking on it now, but more people may want to in the future. Those people may look at the funky cod

Re: [Python-Dev] bytes.from_hex() [Was: PEP 332 revival in coordination with pep 349?]

2006-02-16 Thread Greg Ewing
Josiah Carlson wrote: > They may not be encodings of _unicode_ data, But if they're not encodings of unicode data, what business do they have being available through someunicodestring.encode(...)? Greg ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] http://www.python.org/dev/doc/devel still available

2006-02-16 Thread Gerhard Häring
Jeremy Hylton wrote: > I don't think this message is on-topic for python-dev. There are lots > of great places to discuss the design of the python web site, but the > list for developers doesn't seem like a good place for it. Do we need > a different list for people to gripe^H^H^H^H^H discuss the

Re: [Python-Dev] Adventures with ASTs - Inline Lambda

2006-02-16 Thread Paul Moore
On 2/16/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Talin wrote: > > I definately don't want to start a flame war, although I suspect I already > > have :/ > > I think most about everything has already been said wrt lambda already, > but I guess we could have a little war on spelling issues ;-)

Re: [Python-Dev] Adventures with ASTs - Inline Lambda

2006-02-16 Thread Fredrik Lundh
Talin wrote: > So the general notion is similar to the various proposals on the Wiki - > an inline keyword which serves the function of lambda. I chose the > keyword "given" because it reminds me of math textbooks, e.g. "given x, > solve for y". And I like the idea of syntactical structures that m

Re: [Python-Dev] how bugfixes are handled?

2006-02-16 Thread Arkadiusz Miskiewicz
Guido van Rossum wrote: > We're all volunteers here, and we get a large volume of bugs. That's obvious (note, I'm not complaining, I'm asking ,,how it works for python''). > Unfortunately, bugfixes are reviewed on a voluntary basis. > > Are you aware of the standing offer that if you review 5 bu

[Python-Dev] Adventures with ASTs - Inline Lambda

2006-02-16 Thread Talin
First off, let me apologize for bringing up a topic that I am sure that everyone is sick of: Lambda. I broached this subject to a couple of members of this list privately, and I got wise feedback on my suggestions which basically amounted to "don't waste your time." However, after having thoug

Re: [Python-Dev] 2.5 PEP

2006-02-16 Thread Fredrik Lundh
(my mails to python-dev are bouncing; guess that's what you get when you question the PSF's ability to build web sites... trying again.) Neal Norwitz wrote: > > (is the xmlplus/xmlcore issue still an issue, btw?) > > What issue are you talking about? the changes described here http://mail.