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

2007-05-07 Thread skip
So is having mutable bytes just a matter of calling them byte displays instead of byte literals or does that also require changing something in the back end? Martin It's certainly also an issue of language semantics (i.e. changes Martin to interpreter code). There are a

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

2007-05-07 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: So is having mutable bytes just a matter of calling them byte displays instead of byte literals or does that also require changing something in the back end? Martin It's certainly also an issue of language semantics (i.e. changes Martin to

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-07 Thread Guido van Rossum
[+python-3000; replies please remove python-dev] On 5/5/07, Josiah Carlson [EMAIL PROTECTED] wrote: 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

[Python-Dev] best practices stdlib: purging xrange

2007-05-07 Thread Anthony Baxter
I'd like to suggest that we remove all (or nearly all) uses of xrange from the stdlib. A quick scan shows that most of the usage of it is unnecessary. With it going away in 3.0, and it being informally deprecated anyway, it seems like a good thing to go away where possible. Any objections?

Re: [Python-Dev] best practices stdlib: purging xrange

2007-05-07 Thread Guido van Rossum
But why bother? The 2to3 converter can do this for you. In a sense using range() is more likely to produce broken results in 3.0: if your code depends on the fact that range() returns a list, it is broken in 3.0, and 2to3 cannot help you here. But if you use list(xrange()) today, the converter

Re: [Python-Dev] PEP 30XZ: Simplified Parsing

2007-05-07 Thread skip
Surely from textwrap import dedent as d is close enough? Nick Apart from it happening at run time rather than compile time. And as someone else pointed out, what if you don't want each chunk of text terminated by a newline? Skip

Re: [Python-Dev] best practices stdlib: purging xrange

2007-05-07 Thread Brian Harring
On Tue, May 08, 2007 at 09:14:02AM +1000, Anthony Baxter wrote: I'd like to suggest that we remove all (or nearly all) uses of xrange from the stdlib. A quick scan shows that most of the usage of it is unnecessary. With it going away in 3.0, and it being informally deprecated anyway, it

Re: [Python-Dev] best practices stdlib: purging xrange

2007-05-07 Thread Terry Reedy
Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | But why bother? The 2to3 converter can do this for you. | | In a sense using range() is more likely to produce broken results in | 3.0: if your code depends on the fact that range() returns a list, it | is broken in

Re: [Python-Dev] best practices stdlib: purging xrange

2007-05-07 Thread Raymond Hettinger
I'd like to suggest that we remove all (or nearly all) uses of xrange from the stdlib. A quick scan shows that most of the usage of it is unnecessary. With it going away in 3.0, and it being informally deprecated anyway, it seems like a good thing to go away where possible. Any

Re: [Python-Dev] best practices stdlib: purging xrange

2007-05-07 Thread Guido van Rossum
On 5/7/07, Terry Reedy [EMAIL PROTECTED] wrote: Guido van Rossum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | But why bother? The 2to3 converter can do this for you. | | In a sense using range() is more likely to produce broken results in | 3.0: if your code depends on the