Re: [Python-Dev] Changing string constants to byte arrays in Py3k

2007-05-05 Thread Martin v. Löwis
>> That's not a literal, it's a display. The difference is that >> a literal denotes the same object every time it is executed. >> A display creates a new object every time it is executed. >> (another difference is that a display is a constructed thing >> which may contain runtime-computed compone

[Python-Dev] Weekly Python Patch/Bug Summary

2007-05-05 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 360 open ( +4) / 3760 closed ( +4) / 4120 total ( +8) Bugs: 971 open ( +3) / 6683 closed (+10) / 7654 total (+13) RFE : 257 open ( +3) / 282 closed ( +0) / 539 total ( +3) New / Reopened Patches __ test_1686

[Python-Dev] Summary of Tracker Issues

2007-05-05 Thread Tracker
ACTIVITY SUMMARY (04/29/07 - 05/06/07) Tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 1650 open ( +1) / 8584 closed ( +0) / 10234 total ( +1) Average duration of open issues: 784 days. Medi

Re: [Python-Dev] Changing string constants to byte arrays in Py3k

2007-05-05 Thread Greg Ewing
Steven Bethard wrote: > Does that mean you want list literals to be immutable too? There are no "list literals" in Python, only expressions that construct lists. You might argue that b"abc" is not a literal either, but an expression that constructs a bytes object. However, it *looks* so much lik

Re: [Python-Dev] Changing string constants to byte arrays in Py3k

2007-05-05 Thread Steven Bethard
On 5/5/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >> In general, I don't think it's a good idea to have literals > >> turn into mutable objects, since literals are normally perceived > >> as being constant. > > > > Does that mean you want list literals to be immutable too? > > > > lst =

Re: [Python-Dev] Changing string constants to byte arrays in Py3k

2007-05-05 Thread Steve Holden
Steven Bethard wrote: > On 5/5/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: >> On 2007-05-04 19:51, Guido van Rossum wrote: >>> [-python-dev] >>> >>> On 5/4/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: On Friday 04 May 2007, M.-A. Lemburg wrote: > I also suggest making all bytes lit

Re: [Python-Dev] Changing string constants to byte arrays in Py3k

2007-05-05 Thread Martin v. Löwis
>> In general, I don't think it's a good idea to have literals >> turn into mutable objects, since literals are normally perceived >> as being constant. > > Does that mean you want list literals to be immutable too? > > lst = ['a', 'b', 'c'] > lst.append('d') # raises an error? That's no

Re: [Python-Dev] Byte literals (was Re: [Python-checkins] Changing string constants to byte arrays ( r55119 - in python/branches/py3k-struni/Lib: codecs.py test/test_codecs.py ))

2007-05-05 Thread Josiah Carlson
"Fred L. Drake, Jr." <[EMAIL PROTECTED]> wrote: > > On Saturday 05 May 2007, Aahz wrote: > > I'm with MAL and Fred on making literals immutable -- that's safe and > > lots of newbies will need to use byte literals early in their Python > > experience if they pick up Python to operate on networ

Re: [Python-Dev] Changing string constants to byte arrays in Py3k

2007-05-05 Thread M.-A. Lemburg
On 2007-05-05 18:11, Steven Bethard wrote: > On 5/5/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: >> On 2007-05-04 19:51, Guido van Rossum wrote: >> > [-python-dev] >> > >> > On 5/4/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: >> >> On Friday 04 May 2007, M.-A. Lemburg wrote: >> >> > I also su

Re: [Python-Dev] Byte literals (was Re: [Python-checkins] Changing string constants to byte arrays ( r55119 - in python/branches/py3k-struni/Lib: codecs.py test/test_codecs.py ))

2007-05-05 Thread Fred L. Drake, Jr.
On Saturday 05 May 2007, Aahz wrote: > I'm with MAL and Fred on making literals immutable -- that's safe and > lots of newbies will need to use byte literals early in their Python > experience if they pick up Python to operate on network data. Yes; there are lots of places where bytes literals

Re: [Python-Dev] Changing string constants to byte arrays in Py3k

2007-05-05 Thread Steven Bethard
On 5/5/07, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > On 2007-05-04 19:51, Guido van Rossum wrote: > > [-python-dev] > > > > On 5/4/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: > >> On Friday 04 May 2007, M.-A. Lemburg wrote: > >> > I also suggest making all bytes literals immutable to avoid

[Python-Dev] Byte literals (was Re: [Python-checkins] Changing string constants to byte arrays ( r55119 - in python/branches/py3k-struni/Lib: codecs.py test/test_codecs.py ))

2007-05-05 Thread Aahz
On Fri, May 04, 2007, Guido van Rossum wrote: > > [-python-dev] > > On 5/4/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: >> On Friday 04 May 2007, M.-A. Lemburg wrote: >>> >>> I also suggest making all bytes literals immutable to avoid running >>> into any issues like the above. >> >> +1 from

Re: [Python-Dev] Changing string constants to byte arrays in Py3k

2007-05-05 Thread M.-A. Lemburg
On 2007-05-04 19:51, Guido van Rossum wrote: > [-python-dev] > > On 5/4/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: >> On Friday 04 May 2007, M.-A. Lemburg wrote: >> > I also suggest making all bytes literals immutable to avoid running >> > into any issues like the above. >> >> +1 from me.

Re: [Python-Dev] PyInt_AsSsize_t on x64

2007-05-05 Thread Kristján Valur Jónsson
> -Original Message- > From: Armin Rigo [mailto:[EMAIL PROTECTED] > Given that the __long__ vs __int__ difference doesn't really make sense > any more nowadays, I'd think it would be saner to change the nb_long > slot of old-style instances instead of PyInt_AsSsize_t(). The logic > would b

Re: [Python-Dev] x64 and the testsuite

2007-05-05 Thread Armin Rigo
Hi Kristján, On Thu, May 03, 2007 at 07:38:04PM +0200, ?iga Seilnacht wrote: > Those tests should be fixed to use test.test_support.MAX_Py_ssize_t instead > of sys.maxint. See also the bigmemtest() and bigaddrspacetest() decorators in test_support. A bientot, Armin. __

Re: [Python-Dev] PyInt_AsSsize_t on x64

2007-05-05 Thread Armin Rigo
Hi Kristján, On Thu, May 03, 2007 at 03:57:26PM +, Kristján Valur Jónsson wrote: > if (nb->nb_long != 0) { > io = (PyIntObject*) (*nb->nb_long) (op); > } else { > io = (PyIntObject*) (*nb->nb_int) (op); > } > Now, how to fix this? Should the code in