Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Terry Reedy
"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Why only str()? Note that the interactive prompt uses repr() to display values. I was under the impression that for range, you still wanted to maintain the distinction between an evalable and a friendly representa

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Greg Ewing
Brad Miller wrote: > I wouldn't include the word "object" in any of these. Everything in Python is an object, so it's just space-wasting noise. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-d

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Brad Miller
I worked up prototype implementation for dict_keys, dict_values, and dict_items Here's an example of what the output looks like: >>> x = {chr(i):i for i in range(68,90)} >>> x.keys() >>> x.values() >>> x.items() >>> comments? Are there other objects in this family that I should look at?

Re: [Python-Dev] Global Python Sprint Weekends: May 10th-11th and June 21st-22nd.

2008-04-16 Thread A.M. Kuchling
On Wed, Apr 16, 2008 at 10:51:53AM -0700, Trent Nelson wrote: > Following on from the success of previous sprint/bugfix weekends and > sprinting efforts at PyCon 2008, I'd like to propose the next two > Global Python Sprint Weekends take place on the following dates: A great idea; than

Re: [Python-Dev] thoughts on having EOFError inherit from EnvironmentError?

2008-04-16 Thread Greg Ewing
Guido van Rossum wrote: > You are unique in demanding this. I'm not asking for anything to be changed (I've already agreed that EOFError can stay the way it is), just pointing out what I think is a legitimate use for custom EnvironmentError subclasses. -- Greg __

Re: [Python-Dev] thoughts on having EOFError inherit from EnvironmentError?

2008-04-16 Thread Greg Ewing
Guido van Rossum wrote: > You are unique in demanding this. Really? Nobody else wants a convenient way to distinguish program bugs from exceptions caused by external factors? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Guido van Rossum
No, tp_print is dead, unless I am terribly mistaken. (We didn't remove the slot because that would require updating every single static type initializer.) On Wed, Apr 16, 2008 at 2:39 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Guido van Rossum schrieb: > > > Why only str()? Note that the in

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Christian Heimes
Guido van Rossum schrieb: > Why only str()? Note that the interactive prompt uses repr() to display > values. Does py3k still use the tp_print slot for the interactive prompt? Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

Re: [Python-Dev] thoughts on having EOFError inherit from EnvironmentError?

2008-04-16 Thread Gregory P. Smith
On Mon, Apr 14, 2008 at 7:11 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > But what operations raise EOFError? Surely you're not using > raw_input()? It's really only there for teaching. > > There are quite a few things in Lib/ that raise EOFError on their own. Most look like reasonable use

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Guido van Rossum
On Wed, Apr 16, 2008 at 1:16 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: > > "Guido van Rossum" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > | On Wed, Apr 16, 2008 at 3:15 AM, Armin Rigo <[EMAIL PROTECTED]> wrote: > | > What about the less confusing and more readily genera

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Terry Reedy
"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On Wed, Apr 16, 2008 at 3:15 AM, Armin Rigo <[EMAIL PROTECTED]> wrote: | > What about the less confusing and more readily generalizable: | > | > | > | > It would also be helpful IMHO to use this kind of repr fo

Re: [Python-Dev] Global Python Sprint Weekends: May 10th-11th and June 21st-22nd.

2008-04-16 Thread Michael Foord
Trent Nelson wrote: > Following on from the success of previous sprint/bugfix weekends and > sprinting efforts at PyCon 2008, I'd like to propose the next two > Global Python Sprint Weekends take place on the following dates: > > * May 10th-11th (four days after 2.6a3 and 3.0a5

[Python-Dev] Global Python Sprint Weekends: May 10th-11th and June 21st-22nd.

2008-04-16 Thread Trent Nelson
Following on from the success of previous sprint/bugfix weekends and sprinting efforts at PyCon 2008, I'd like to propose the next two Global Python Sprint Weekends take place on the following dates: * May 10th-11th (four days after 2.6a3 and 3.0a5 are released) * June

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Isaac Morland
On Wed, 16 Apr 2008, David Wolever wrote: > On 16-Apr-08, at 9:37 AM, Isaac Morland wrote: >> On Wed, 16 Apr 2008, Paul Moore wrote: >>> On 16/04/2008, Armin Rigo <[EMAIL PROTECTED]> wrote: What about the less confusing and more readily generalizable: It would also be helpfu

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Guido van Rossum
On Wed, Apr 16, 2008 at 3:15 AM, Armin Rigo <[EMAIL PROTECTED]> wrote: > What about the less confusing and more readily generalizable: > > > > It would also be helpful IMHO to use this kind of repr for most built-in > iterators and iterables, instead of their mosty-useless default repr. We

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Curt Hagenlocher
On Wed, Apr 16, 2008 at 6:58 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > > If you consume values from the iterator to display them in the repr() > where do you then propose to store them until the application wants > them, and how do you distinguish between "real" and "repr" consumption > of the

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Brad Miller
On Apr 16, 2008, at 5:15 AM, Armin Rigo wrote: > Hi Greg, > > On Wed, Apr 16, 2008 at 03:34:44PM +1200, Greg Ewing wrote: >>> That's why I proposed <0, 1, ..., 9> for repr(range(10)). >> >> My worry is that this will lead a newcomer into thinking >> this is some kind of valid expression syntax. >

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Nick Coghlan
Isaac Morland wrote: > On Wed, 16 Apr 2008, Paul Moore wrote: > >> On 16/04/2008, Armin Rigo <[EMAIL PROTECTED]> wrote: >>> What about the less confusing and more readily generalizable: >>> >>> >>> >>> It would also be helpful IMHO to use this kind of repr for most built-in >>> iterators and it

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Steve Holden
Isaac Morland wrote: > On Wed, 16 Apr 2008, Paul Moore wrote: > >> On 16/04/2008, Armin Rigo <[EMAIL PROTECTED]> wrote: >>> What about the less confusing and more readily generalizable: >>> >>> >>> >>> It would also be helpful IMHO to use this kind of repr for most built-in >>> iterators and it

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread David Wolever
On 16-Apr-08, at 9:37 AM, Isaac Morland wrote: > On Wed, 16 Apr 2008, Paul Moore wrote: >> On 16/04/2008, Armin Rigo <[EMAIL PROTECTED]> wrote: >>> What about the less confusing and more readily generalizable: >>> >>> >>> It would also be helpful IMHO to use this kind of repr for most >>> buil

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Isaac Morland
On Wed, 16 Apr 2008, Paul Moore wrote: > On 16/04/2008, Armin Rigo <[EMAIL PROTECTED]> wrote: >> What about the less confusing and more readily generalizable: >> >> >> >> It would also be helpful IMHO to use this kind of repr for most built-in >> iterators and iterables, instead of their mosty-

Re: [Python-Dev] mmap.flush [was: NeedsReview keyword]

2008-04-16 Thread Ralf Schmitt
On Wed, Apr 16, 2008 at 3:29 PM, Jeroen Ruigrok van der Werven < [EMAIL PROTECTED]> wrote: > -On [20080416 15:20], Ralf Schmitt ([EMAIL PROTECTED]) wrote: > >I think documenting this insanity is just insane and doesn't help much. > >Anyway, you can now close http://bu

Re: [Python-Dev] mmap.flush [was: NeedsReview keyword]

2008-04-16 Thread Jeroen Ruigrok van der Werven
-On [20080416 15:20], Ralf Schmitt ([EMAIL PROTECTED]) wrote: >I think documenting this insanity is just insane and doesn't help much. >Anyway, you can now close http://bugs.python.org/issue2122 as wontfix. Why? I added documentation for the current way. I was not aware of the oth

[Python-Dev] Unreachable code in mmapmodule.c?

2008-04-16 Thread Jeroen Ruigrok van der Werven
Reading through Modules/mmapmodule.c to work on some documentation I encountered this: 24 #ifndef MS_WINDOWS 25 #define UNIX 26 #endif 536 #ifdef MS_WINDOWS 537 return PyInt_FromLong((long) FlushViewOfFile(self->data+offset, siz e)); 538 #elif defined(UNIX) 539 /* X

Re: [Python-Dev] mmap.flush [was: NeedsReview keyword]

2008-04-16 Thread Ralf Schmitt
On Wed, Apr 16, 2008 at 2:58 PM, Jeroen Ruigrok van der Werven < [EMAIL PROTECTED]> wrote: > -On [20080415 23:37], Ralf Schmitt ([EMAIL PROTECTED]) wrote: > >The documentation for mmap.flush does not even mention a return value. > > Fixed in revision 62359. > I think documenting this insanity is

Re: [Python-Dev] mmap.flush [was: NeedsReview keyword]

2008-04-16 Thread Jeroen Ruigrok van der Werven
-On [20080415 23:37], Ralf Schmitt ([EMAIL PROTECTED]) wrote: >The documentation for mmap.flush does not even mention a return value. Fixed in revision 62359. -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ With a nuclear

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Paul Moore
On 16/04/2008, Armin Rigo <[EMAIL PROTECTED]> wrote: > What about the less confusing and more readily generalizable: > > > > It would also be helpful IMHO to use this kind of repr for most built-in > iterators and iterables, instead of their mosty-useless default repr. I quite like this. But as

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Armin Rigo
Hi Greg, On Wed, Apr 16, 2008 at 03:34:44PM +1200, Greg Ewing wrote: > > That's why I proposed <0, 1, ..., 9> for repr(range(10)). > > My worry is that this will lead a newcomer into thinking > this is some kind of valid expression syntax. What about the less confusing and more readily generaliz