Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread Ron Adam
Martin v. Löwis wrote: This is what prompted my question, actually: in Py3k, in the str/unicode unification branch, r\u1234 changes meaning: before the unification, this was an 8-bit string, where the \u was not special, but now it is a unicode string, where \u *is* special. That is true

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread M.-A. Lemburg
On 2007-05-11 07:52, Martin v. Löwis wrote: This is what prompted my question, actually: in Py3k, in the str/unicode unification branch, r\u1234 changes meaning: before the unification, this was an 8-bit string, where the \u was not special, but now it is a unicode string, where \u *is*

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread Georg Brandl
M.-A. Lemburg schrieb: Windows path names are one of the two primary applications of raw strings (the other being regexes). IMHO the primary use case are regexps and for those you'd definitely want to be able to put Unicode characters into your expressions. Except if sre_parse would

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread M.-A. Lemburg
On 2007-05-11 13:05, Thomas Heller wrote: M.-A. Lemburg schrieb: On 2007-05-11 07:52, Martin v. Löwis wrote: This is what prompted my question, actually: in Py3k, in the str/unicode unification branch, r\u1234 changes meaning: before the unification, this was an 8-bit string, where the \u was

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread Thomas Heller
M.-A. Lemburg schrieb: On 2007-05-11 07:52, Martin v. Löwis wrote: This is what prompted my question, actually: in Py3k, in the str/unicode unification branch, r\u1234 changes meaning: before the unification, this was an 8-bit string, where the \u was not special, but now it is a unicode

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread Guido van Rossum
On 5/10/07, Martin v. Löwis [EMAIL PROTECTED] wrote: Windows path names are one of the two primary applications of raw strings (the other being regexes). I disagree with this use case; the r... notation was not invented for this purpose. I won't compromise the escaping of quotes to accommodate

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread David Goodger
Guido van Rossum guido at python.org writes: I'd like to hear from anyone who has access to *real code* that uses \u or \U in a raw unicode string. Docutils uses it in the docutils.parsers.rst.states module, Body class: patterns = { 'bullet': ur'[-+*\u2022\u2023\u2043]( +|$)',

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread Guido van Rossum
On 5/11/07, David Goodger [EMAIL PROTECTED] wrote: Guido van Rossum guido at python.org writes: I'd like to hear from anyone who has access to *real code* that uses \u or \U in a raw unicode string. Docutils uses it in the docutils.parsers.rst.states module, Body class: patterns = {

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread David Goodger
Guido van Rossum guido at python.org writes: I'd like to hear from anyone who has access to *real code* that uses \u or \U in a raw unicode string. David Goodger goodger at python.org writes: Docutils uses it in the docutils.parsers.rst.states module, Body class: patterns = {

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread David Goodger
On 5/11/07, David Goodger [EMAIL PROTECTED] wrote: Docutils uses it in the docutils.parsers.rst.states module, Body class: patterns = { 'bullet': ur'[-+*\u2022\u2023\u2043]( +|$)', ... attribution_pattern = re.compile(ur'(---?(?!-)|\u2014) *(?=[^ \n])') On

Re: [Python-Dev] Official version support statement

2007-05-11 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On May 10, 2007, at 12:53 PM, Terry Reedy wrote: This strikes me as a bit over-officious (the 'officially' adds nothing to me except a bit of stuffiness). Worse, it seems wrong and hence, to me, misleading. The current de facto policy is

Re: [Python-Dev] Official version support statement

2007-05-11 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On May 10, 2007, at 6:46 PM, Martin v. Löwis wrote: The Python Software Foundation officially supports the current stable major release and one prior major release. Currently, Python 2.5 and 2.4 are officially supported. If you take officially

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread Michael Foord
Martin v. Löwis wrote: This is what prompted my question, actually: in Py3k, in the str/unicode unification branch, r\u1234 changes meaning: before the unification, this was an 8-bit string, where the \u was not special, but now it is a unicode string, where \u *is* special. That is

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread Martin v. Löwis
Using double backslashes won't cause that reaction: os.stat(c:\\windows\\system32\\user32.dll) Please refer to the subject. We are talking about raw strings. Windows path names are one of the two primary applications of raw strings (the other being regexes). IMHO the primary use case

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread Martin v. Löwis
BTW, there's an easy work-around for this special case: os.stat(os.path.join(rc:\windows\system32, user32.dll)) No matter what the decision is, there are always work-arounds. The question is what language suits the users most. Being able to specify characters by ordinal IMO has much less

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread Guido van Rossum
I think I'm going to break my own rules and ask Martin to write up a PEP. Given the pragmatics that Windows pathnames *are* a common use case, I'm willing to let allow the trailing \ in the string. A regular expression containing a quote could be written using triple quotes, e.g. r(['])[^']*\1. (A

Re: [Python-Dev] New operations in Decimal

2007-05-11 Thread Greg Ewing
Terry Reedy wrote: Raymond Hettinger [EMAIL PROTECTED] wrote in message | While I question the sanity of the spec writers in this case, I do trust that | overall, they have provided an extremely well thought-out spec, have gone | through extensive discussion/feedback cycles, and have

Re: [Python-Dev] New operations in Decimal

2007-05-11 Thread Raymond Hettinger
The only rationale I can think of for such a thing is that maybe they're trying to accommodate the possibility of a machine built entirely around a hardware implementation of the spec, that doesn't have any other way of doing bitwise logical operations. If that's the case, then Python

Re: [Python-Dev] New operations in Decimal

2007-05-11 Thread Nick Coghlan
Greg Ewing wrote: Terry Reedy wrote: I had the same opinion until I saw the logic stuff. The only rationale I can think of for such a thing is that maybe they're trying to accommodate the possibility of a machine built entirely around a hardware implementation of the spec, that doesn't

Re: [Python-Dev] \u and \U escapes in raw unicode string literals

2007-05-11 Thread Andrew McNabb
On Sat, May 12, 2007 at 01:30:52AM +0200, M.-A. Lemburg wrote: I wonder how we managed to survive all these years with the existing consistent and concise definition of the raw-unicode-escape codec ;-) There are two options: * no one really uses Unicode raw strings nowadays * none

Re: [Python-Dev] Official version support statement

2007-05-11 Thread Tony Nelson
At 12:58 AM +0200 5/12/07, Martin v. Löwis wrote: The Python Software Foundation officially supports the current stable major release of Python. By supports we mean that the PSF will produce bug fix releases of this version, currently Python 2.5. We may release patches for earlier versions if

Re: [Python-Dev] Official version support statement

2007-05-11 Thread skip
Tony The Python Software Foundation maintains the current stable major Tony release of Python. By maintains we mean that the PSF will Tony produce bug fix releases of that version, currently Python 2.5. Tony We have released patches for earlier versions as necessary, such

Re: [Python-Dev] Official version support statement

2007-05-11 Thread Terry Reedy
Tony Nelson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] At 12:58 AM +0200 5/12/07, Martin v. Löwis wrote: |However, I would prefer to not use the verb support at all. agreed |The Python Software Foundation maintains the current stable major |release of Python. By maintains we

Re: [Python-Dev] New operations in Decimal

2007-05-11 Thread Terry Reedy
Greg Ewing [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | The only rationale I can think of for such a thing is | that maybe they're trying to accommodate the possibility | of a machine built entirely around a hardware implementation | of the spec, that doesn't have any other way of

Re: [Python-Dev] Official version support statement

2007-05-11 Thread Stephen J. Turnbull
Martin v. Löwis writes: However, I would prefer to not use the verb support at all. We (the PSF) don't provide any technical support for *any* version ever released: '''PSF is making Python available to Licensee on an AS IS basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES [...].''' Of

Re: [Python-Dev] New operations in Decimal

2007-05-11 Thread Raymond Hettinger
The only rationale I can think of for such a thing is that maybe they're trying to accommodate the possibility of a machine built entirely around a hardware implementation of the spec, that doesn't have any other way of doing bitwise logical operations. Nonsense. The logical operations are

Re: [Python-Dev] New operations in Decimal

2007-05-11 Thread Tim Peters
[Raymond Hettinger] ... My intention for the module is to be fully compliant with the spec and all of its tests. Code written in other languages which support the spec should expect to be transferrable to Python and run exactly as they did in the original language. The module itself

Re: [Python-Dev] Official version support statement

2007-05-11 Thread Anthony Baxter
On Saturday 12 May 2007, [EMAIL PROTECTED] wrote: Since there is (generally?) an attempt to make one last bug fix release of the previous version after the next major version is released, should that be mentioned? To make it concrete, I believe shortly after 2.5.0 was released the final bug