Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread Scott Dial
Brett Cannon wrote: Sure, making it 'start' or something and having it be keyword-only makes sense. http://bugs.python.org/issue2831 -Scott -- Scott Dial [EMAIL PROTECTED] [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://ma

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 7:02 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 6:50 PM, Oleg Broytmann <[EMAIL PROTECTED]> wrote: >> On Sun, May 11, 2008 at 06:39:02PM -0700, Brett Cannon wrote: >>> cgi.escape() to the html package somewhere (either 'html', >>> 'html.parser'

Re: [Python-Dev] How best to handle the docs for a renamed module?

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 8:17 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On a sunny day, Brett Cannon <[EMAIL PROTECTED]> wrote: >> For the sake of argument, let's consider the Queue module. It is now >> named queue. For 2.6 I plan on having both Queue and queue listed in >> the index, with Q

Re: [Python-Dev] How best to handle the docs for a renamed module?

2008-05-11 Thread Guido van Rossum
On a sunny day, Brett Cannon <[EMAIL PROTECTED]> wrote: > For the sake of argument, let's consider the Queue module. It is now > named queue. For 2.6 I plan on having both Queue and queue listed in > the index, with Queue deprecated with instructions to use the new > name. > > But what to do about

[Python-Dev] How best to handle the docs for a renamed module?

2008-05-11 Thread Brett Cannon
For the sake of argument, let's consider the Queue module. It is now named queue. For 2.6 I plan on having both Queue and queue listed in the index, with Queue deprecated with instructions to use the new name. But what to do about all the references. Should we leave them pointing at Queue to lesse

Re: [Python-Dev] How to help out with PEP 3108

2008-05-11 Thread Guilherme Polo
2008/5/11 Brett Cannon <[EMAIL PROTECTED]>: > I have tried to update PEP 3108 > (http://www.python.org/dev/peps/pep-3108/) as best as I can to list > what needs to be done for each module in order to get it removed if > there is some extra step. The ones without comment most likely need no > specia

Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread A.M. Kuchling
On Mon, May 12, 2008 at 12:21:00PM +1200, Greg Ewing wrote: > Parsing a file and wanting to be able to print > error messages with line numbers would seem to > be a fairly likely use. Couldn't people be using the fileinput module for this, though? --amk ___

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Guido van Rossum
On Sun, May 11, 2008 at 6:50 PM, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 06:39:02PM -0700, Brett Cannon wrote: >> cgi.escape() to the html package somewhere (either 'html', >> 'html.parser' which is currently HTMLParser, or some new module; > > html.parser.escape() see

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Oleg Broytmann
On Sun, May 11, 2008 at 06:39:02PM -0700, Brett Cannon wrote: > cgi.escape() to the html package somewhere (either 'html', > 'html.parser' which is currently HTMLParser, or some new module; html.parser.escape() seems a bit backward; html.escape() fits the best! Oleg. -- Oleg Broytmann

[Python-Dev] How to help out with PEP 3108

2008-05-11 Thread Brett Cannon
I have tried to update PEP 3108 (http://www.python.org/dev/peps/pep-3108/) as best as I can to list what needs to be done for each module in order to get it removed if there is some extra step. The ones without comment most likely need no special work and thus I can take care of really quickly myse

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 6:35 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 6:34 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: >> On Sun, May 11, 2008 at 6:23 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >>> On Sun, May 11, 2008 at 5:01 PM, Brett Cannon <[EMAIL PROTECTED

Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 6:23 PM, Scott Dial <[EMAIL PROTECTED]> wrote: > Brett Cannon wrote: >> >> Taking a new argument that has a default shouldn't be an issue. +1 >> from me. I assume it is just going to start the count at that number, >> not advance the iterable to that point, right? > > I wond

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Guido van Rossum
On Sun, May 11, 2008 at 6:34 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 6:23 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >> On Sun, May 11, 2008 at 5:01 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: >>> On Sun, May 11, 2008 at 4:43 PM, Guido van Rossum <[EMAIL PROTECTED

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 6:23 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 5:01 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: >> On Sun, May 11, 2008 at 4:43 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >>> On Sun, May 11, 2008 at 12:00 AM, Georg Brandl <[EMAIL PROTECTE

Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread Guido van Rossum
+1 to this. On Sun, May 11, 2008 at 6:23 PM, Scott Dial <[EMAIL PROTECTED]> wrote: > Brett Cannon wrote: >> >> Taking a new argument that has a default shouldn't be an issue. +1 >> from me. I assume it is just going to start the count at that number, >> not advance the iterable to that point, righ

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Guido van Rossum
On Sun, May 11, 2008 at 5:01 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 4:43 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >> On Sun, May 11, 2008 at 12:00 AM, Georg Brandl <[EMAIL PROTECTED]> wrote: >>> Fred Drake schrieb: On May 10, 2008, at 11:49 PM, Guido

Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread Scott Dial
Brett Cannon wrote: Taking a new argument that has a default shouldn't be an issue. +1 from me. I assume it is just going to start the count at that number, not advance the iterable to that point, right? I wonder if it would be best for it to be a keyword-only argument. So many of the utility f

Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread Greg Ewing
Steven D'Aprano wrote: The only thing I can think of is printing lines with line numbers Parsing a file and wanting to be able to print error messages with line numbers would seem to be a fairly likely use. -- Greg ___ Python-Dev mailing list Python-

Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread Facundo Batista
2008/5/11, Brett Cannon <[EMAIL PROTECTED]>: > It's a common enough use-case, so I think it makes sense. With the > cost being so minimal to add support I think this one use-case alone > is enough to justify adding the support. +1 -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 4:43 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 12:00 AM, Georg Brandl <[EMAIL PROTECTED]> wrote: >> Fred Drake schrieb: >>> >>> On May 10, 2008, at 11:49 PM, Guido van Rossum wrote: Works for me. The other thing I always use from cgi

Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 4:42 PM, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 12 May 2008 08:20:51 am Georg Brandl wrote: >> I believe the following is a common use-case for enumerate() >> (at least, I've used it quite some times): >> >> for lineno, line in enumerate(fileobject): >> ..

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Guido van Rossum
On Sun, May 11, 2008 at 12:00 AM, Georg Brandl <[EMAIL PROTECTED]> wrote: > Fred Drake schrieb: >> >> On May 10, 2008, at 11:49 PM, Guido van Rossum wrote: >>> >>> Works for me. The other thing I always use from cgi is escape() -- >>> will that be available somewhere else too? >> >> >> xml.sax.saxu

Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread Steven D'Aprano
On Mon, 12 May 2008 08:20:51 am Georg Brandl wrote: > I believe the following is a common use-case for enumerate() > (at least, I've used it quite some times): > > for lineno, line in enumerate(fileobject): > ... > > For this, it would be nice to have a start parameter for enumerate(). Why wo

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Alexandre Vassalotti
On Sun, May 11, 2008 at 5:29 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > Hello, > > I have been working the module renaming for PEP-3108, and I just > noticed that some buildbots are throwing errors while updating their > checkout. It seems the method I use for renaming modules hits a > s

Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread Georg Brandl
Brett Cannon schrieb: On Sun, May 11, 2008 at 3:20 PM, Georg Brandl <[EMAIL PROTECTED]> wrote: I believe the following is a common use-case for enumerate() (at least, I've used it quite some times): for lineno, line in enumerate(fileobject): ... For this, it would be nice to have a start pa

Re: [Python-Dev] Adding start to enumerate()

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 3:20 PM, Georg Brandl <[EMAIL PROTECTED]> wrote: > I believe the following is a common use-case for enumerate() > (at least, I've used it quite some times): > > for lineno, line in enumerate(fileobject): >... > > For this, it would be nice to have a start parameter for e

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 3:38 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 6:31 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: >> The PEP specifies the lib-old directory to hold the old case name so >> that the svn rename won't lead to two files in the same directory. I

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Alexandre Vassalotti
On Sun, May 11, 2008 at 6:31 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: > The PEP specifies the lib-old directory to hold the old case name so > that the svn rename won't lead to two files in the same directory. I > was hoping that creating the stub in lib-old would allow a simple > ``svn rename``

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 3:16 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 5:44 PM, Paul Moore <[EMAIL PROTECTED]> wrote: >> 2008/5/11 Alexandre Vassalotti <[EMAIL PROTECTED]>: >>> When I rename a module I use "svn copy", since "svn remove" doesn't >>> pick up change

[Python-Dev] Adding start to enumerate()

2008-05-11 Thread Georg Brandl
I believe the following is a common use-case for enumerate() (at least, I've used it quite some times): for lineno, line in enumerate(fileobject): ... For this, it would be nice to have a start parameter for enumerate(). The changes are minimal -- okay for 2.6? Georg -- Thus spake the Lord

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Alexandre Vassalotti
On Sun, May 11, 2008 at 5:44 PM, Paul Moore <[EMAIL PROTECTED]> wrote: > 2008/5/11 Alexandre Vassalotti <[EMAIL PROTECTED]>: >> When I rename a module I use "svn copy", since "svn remove" doesn't >> pick up changes made to the "deleted" file. For example, here is what >> I did for PixMapWrapper: >>

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Oleg Broytmann
On Sun, May 11, 2008 at 11:45:03PM +0200, Georg Brandl wrote: > In any case, how does SVN on Windows handle this situation, having two > identical filenames -- except for case -- in one directory? Very bad. It's completely confused. It can checkout one of the files and commit the other. Oleg.

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Georg Brandl
Alexandre Vassalotti schrieb: When I rename a module I use "svn copy", since "svn remove" doesn't pick up changes made to the "deleted" file. For example, here is what I did for PixMapWrapper: svn copy ./Lib/plat-mac/PixMapWrapper.py ./Lib/plat-mac/pixmapwrapper.py edit ./Lib/plat-mac/Pix

Re: [Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Paul Moore
Sorry, should have gone to the list: 2008/5/11 Alexandre Vassalotti <[EMAIL PROTECTED]>: > When I rename a module I use "svn copy", since "svn remove" doesn't > pick up changes made to the "deleted" file. For example, here is what > I did for PixMapWrapper: > > svn copy ./Lib/plat-mac/PixMapWra

[Python-Dev] Buildbots have trouble checking out the repository due to recent changes.

2008-05-11 Thread Alexandre Vassalotti
Hello, I have been working the module renaming for PEP-3108, and I just noticed that some buildbots are throwing errors while updating their checkout. It seems the method I use for renaming modules hits a subversion bug on certain platforms. The error thrown looks like this: ... svn: In directory

Re: [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-11 Thread Richard Boulton
Jeroen Ruigrok van der Werven wrote: -On [20080502 10:50], Steve Holden ([EMAIL PROTECTED]) wrote: Groan. Then everyone else realizes what a "great idea" this is, and we see ~/Perl/, ~/Ruby/, ~/C# (that'll screw the Microsoft users, a directory with a comment market in its name), ~/Lisp/ and th

Re: [Python-Dev] Problems with the new super()

2008-05-11 Thread [EMAIL PROTECTED]
On May 2, 7:54 am, Greg Ewing <[EMAIL PROTECTED]> wrote: > > I can only speak from my own experience, which is that > whenever I've had a problem involving multiple inheritance, > super() didn't solve it. What did solve it was either > refactoring so that the classes being mixed were more > indepen

Re: [Python-Dev] Encoding detection in the standard library?

2008-05-11 Thread Greg Wilson
Bill Janssen: Since the site that receives the POST doesn't necessarily have access to the Web page that originally contained the form, that's not really helpful. However, POSTs can use the MIME type "multipart/form-data" for non-Latin-1 content, and should. That contains facilities for indi

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Brett Cannon
On Sun, May 11, 2008 at 8:31 AM, Georg Brandl <[EMAIL PROTECTED]> wrote: > Brett Cannon schrieb: >> >> There is going to be an issue with the current proposal for keeping >> around urllib. Since the package is to be named the same thing as the >> module, to handle the new name that means urllib.__i

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Brett C.
-Brett [from his iPod touch] On 11-May-08, at 0:04, Fred Drake <[EMAIL PROTECTED]> wrote: On Sat, May 10, 2008 at 11:38 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: I see three solutions for dealing with this. 1. Have stubs for the entire urllib API in urllib.__init__ that raise a Deprecat

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Brett C.
-Brett [from his iPod touch] On 10-May-08, at 23:58, "Alexandre Vassalotti" <[EMAIL PROTECTED]> wrote: On Sat, May 10, 2008 at 11:38 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: I see three solutions for dealing with this. 1. Have stubs for the entire urllib API in urllib.__init__ that

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Brett C.
-Brett [from his iPod touch] On 10-May-08, at 23:46, "Alexandre Vassalotti" <[EMAIL PROTECTED]> wrote: On Sat, May 10, 2008 at 11:43 PM, <[EMAIL PROTECTED]> wrote: Brett> There is going to be an issue with the current proposal for Brett> keeping around urllib. Since the package is

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Brett C.
-Brett [from his iPod touch] On 10-May-08, at 20:49, "Guido van Rossum" <[EMAIL PROTECTED]> wrote: Works for me. The other thing I always use from cgi is escape() -- will that be available somewhere else too? It can be. =) -Brett On Sat, May 10, 2008 at 8:30 PM, Brett Cannon <[EMAIL P

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Brett C.
On 10-May-08, at 20:43, [EMAIL PROTECTED] wrote: Brett> There is going to be an issue with the current proposal for Brett> keeping around urllib. Since the package is to be named the same Brett> thing as the module Is this the only module morphing into a package of the same n

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Jeremy Hylton
On Sat, May 10, 2008 at 11:38 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: > There is going to be an issue with the current proposal for keeping > around urllib. Since the package is to be named the same thing as the > module, to handle the new name that means urllib.__init__ will need to > gain the

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Georg Brandl
Brett Cannon schrieb: There is going to be an issue with the current proposal for keeping around urllib. Since the package is to be named the same thing as the module, to handle the new name that means urllib.__init__ will need to gain the Py3K warning for the new name. But that doesn't quite wor

Re: [Python-Dev] Trickery with moving urllib

2008-05-11 Thread Fred Drake
On Sat, May 10, 2008 at 11:38 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: I see three solutions for dealing with this. 1. Have stubs for the entire urllib API in urllib.__init__ that raise a DeprecationWarning either specifying the new name or saying the function/class is deprecated. On May 11

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-11 Thread Georg Brandl
Fred Drake schrieb: On May 10, 2008, at 11:49 PM, Guido van Rossum wrote: Works for me. The other thing I always use from cgi is escape() -- will that be available somewhere else too? xml.sax.saxutils.escape() would be an appropriate replacement, though the location is a little funky. Ide