Re: [Python-Dev] String concatenation

2008-08-09 Thread Matt Giuca
Is the only issue with this feature that you might accidentally miss a comma after a string in a sequence of strings? That seems like a significantly obscure scenario compared to the usefulness of the current syntax, for exactly the purpose Barry points out (which most people use all the time). I

[Python-Dev] bytes.tohex in Python 3

2008-08-09 Thread Matt Giuca
Hi, I'm confused as to how you represent a bytes object in hexadecimal in Python 3. Of course in Python 2, you use str.encode('hex') to go to hex, and hexstr.decode('hex') to go from hex. In Python 3, they removed "hex" as a codec (which was a good move, I think). Now there's the static method by

[Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread skip
Are big merges from the trunk still being made to the py3k branch? I checked in a change to csv.DictReader on the trunk yesterday evening. I will port it to py3k if necessary, but I was under the impression that the merge gnomes are constantly busy at work behind the scene. If this activity has

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread Guido van Rossum
On Sat, Aug 9, 2008 at 7:40 AM, <[EMAIL PROTECTED]> wrote: > Are big merges from the trunk still being made to the py3k branch? I > checked in a change to csv.DictReader on the trunk yesterday evening. I > will port it to py3k if necessary, but I was under the impression that the > merge gnomes

Re: [Python-Dev] bytes.tohex in Python 3

2008-08-09 Thread Matt Giuca
Well, whether there's community support for this or not, I thought I'd have a go at implementing this, so I did. I've submitted a feature request + working patch to the bug tracker: http://bugs.python.org/issue3532 Matt PS. I mean ''.join("%02x" % b for b in mybytes)

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread skip
Guido> However if you think your change requires any kind of manual help Guido> to be merged, it's better to do the merge yourself for just that Guido> revision: svnmerge.py merge -rN. That way it'll be recorded Guido> as merged and a later big merge will skip it. Looks like t

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread Guido van Rossum
Google for it. It's worth learning. :-) On Sat, Aug 9, 2008 at 9:37 AM, <[EMAIL PROTECTED]> wrote: > >Guido> However if you think your change requires any kind of manual help >Guido> to be merged, it's better to do the merge yourself for just that >Guido> revision: svnmerge.py merge -

Re: [Python-Dev] bytes.tohex in Python 3

2008-08-09 Thread Guido van Rossum
On Sat, Aug 9, 2008 at 12:40 AM, Matt Giuca <[EMAIL PROTECTED]> wrote: > I'm confused as to how you represent a bytes object in hexadecimal in Python > 3. Of course in Python 2, you use str.encode('hex') to go to hex, and > hexstr.decode('hex') to go from hex. > > In Python 3, they removed "hex" as

Re: [Python-Dev] bytes.tohex in Python 3

2008-08-09 Thread Matt Giuca
Hi Guido, Ah yes Martin just pointed this out on the tracker. I think it would still be worthwhile having the tohex method, if not just to counter the obscurity of the binascii.hexlify function (but for other reasons too). Also there's an issue with all the functions in binascii - they return byt

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread Martin v. Löwis
> Looks like there's a bit of manual work to do (replacing "try/finally" with > "with", for example). Why that? Shouldn't the 2.6 code already use the with statement? Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.o

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread Brett Cannon
On Sat, Aug 9, 2008 at 9:37 AM, <[EMAIL PROTECTED]> wrote: > >Guido> However if you think your change requires any kind of manual help >Guido> to be merged, it's better to do the merge yourself for just that >Guido> revision: svnmerge.py merge -rN. That way it'll be recorded >G

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread skip
>> Looks like there's a bit of manual work to do (replacing >> "try/finally" with "with", for example). Martin> Why that? Shouldn't the 2.6 code already use the with statement? The csv test code uses try/finally on trunk but with on py3k. Skip __

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread Skip Montanaro
>> I don't know what svnmerge.py is ... > As always, the dev FAQ has the answer you are looking for: > http://python.org/dev/faq/#how-do-i-merge-between-branches . OK, I ran svnmerge, resolved conflicts, ran the tests, checked in the changes with the commit message svnmerge generated. Am I suppo

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread Guido van Rossum
If you use svnmerge properly you won't have to block anything in this case. Blocking is used to mark revs that are applied to 2.6 but should *not* apply to 3.0. We never merge from py3k to the trunk, only from the trunk to py3k. --Guido On Sat, Aug 9, 2008 at 12:50 PM, Skip Montanaro <[EMAIL PR

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread Martin v. Löwis
> Martin> Why that? Shouldn't the 2.6 code already use the with statement? > > The csv test code uses try/finally on trunk but with on py3k. So why doesn't it use with on the trunk? Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread skip
Guido> If you use svnmerge properly you won't have to block anything in Guido> this case. Let's assume I used it correctly. (That, of course, remains to be seen.) What about the checkin I did will tell someone running svnmerge later that r65605 has already been merged to py3k? Skip

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread skip
Martin> Why that? Shouldn't the 2.6 code already use the with statement? >> The csv test code uses try/finally on trunk but with on py3k. Martin> So why doesn't it use with on the trunk? I don't know. I sure wasn't going to change that code at this point. Skip ___

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread Georg Brandl
[EMAIL PROTECTED] schrieb: Guido> If you use svnmerge properly you won't have to block anything in Guido> this case. Let's assume I used it correctly. (That, of course, remains to be seen.) What about the checkin I did will tell someone running svnmerge later that r65605 has already bee

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread skip
Georg> svnmerge stores information about merged and blocked revisions in Georg> SVN properties of the root directory. In your case, you didn't Georg> commit the property change, so svnmerge doesn't assume 65605 as Georg> integrated yet. If you still have the property change in yo

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread Georg Brandl
[EMAIL PROTECTED] schrieb: Georg> svnmerge stores information about merged and blocked revisions in Georg> SVN properties of the root directory. In your case, you didn't Georg> commit the property change, so svnmerge doesn't assume 65605 as Georg> integrated yet. If you still ha

[Python-Dev] Dealing with mimetools usage in the stdlib

2008-08-09 Thread Brett Cannon
On my quest to remove warnings raised in 2.6 when Python is run with -3, the issue of dealing with mimetools has come up in terms of backwards-compatibility. For instance, in BaseHTTPServer, the headers attribute on BaseHTTPRequestHandler is an instance of mimetools.Message. But in 3.0 it is an ins

Re: [Python-Dev] Dealing with mimetools usage in the stdlib

2008-08-09 Thread Adam Olsen
On Sat, Aug 9, 2008 at 11:41 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: > On my quest to remove warnings raised in 2.6 when Python is run with > -3, the issue of dealing with mimetools has come up in terms of > backwards-compatibility. For instance, in BaseHTTPServer, the headers > attribute on Ba