Re: [Python-3000] python-safethread project status

2008-04-07 Thread Adam Olsen
On Mon, Apr 7, 2008 at 11:58 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > We have a way to raise an exception in a thread asynchronously, *but* > we don't have a way to interrupt either system calls or blocked lock > acquisitions. I suppose that system calls can be made interruptable > with

Re: [Python-3000] python-safethread project status

2008-04-07 Thread Guido van Rossum
We have a way to raise an exception in a thread asynchronously, *but* we don't have a way to interrupt either system calls or blocked lock acquisitions. I suppose that system calls can be made interruptable with suitable tweaking of various signal-related settings (at least on Unix -- and I expect

Re: [Python-3000] python-safethread project status

2008-04-07 Thread Jeffrey Yasskin
On Mon, Apr 7, 2008 at 7:40 PM, Greg Ewing <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > > Maybe it should be a forked subprocess then, if it doesn't touch > > anything shared? > > It might be taking and returning large data structures > that it would be tedious to transfer between p

Re: [Python-3000] Types and classes

2008-04-07 Thread Guido van Rossum
On Mon, Apr 7, 2008 at 8:04 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: > Should print() have an option to convert with repr instead of str? I don't think so -- just write the repr() call. Or write print(*map(repr, (a, b, c))) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___

Re: [Python-3000] Types and classes

2008-04-07 Thread Guido van Rossum
On Mon, Apr 7, 2008 at 6:50 PM, Greg Ewing <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > what do people think of making the str() of a class > > return just the thing between '...' in the repr()? > > Are you talking about the class itself, or instances > of the class? No, the class

Re: [Python-3000] Types and classes

2008-04-07 Thread Terry Reedy
"Greg Ewing" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Terry Reedy wrote: | | > As in | > | print(type(3)) | > | > int # instead of | | I have the same feeling there -- the only time I'm | likely to be deliberately printing a class is for | debugging, and then I want una

Re: [Python-3000] python-safethread project status

2008-04-07 Thread Adam Olsen
On Mon, Apr 7, 2008 at 8:40 PM, Greg Ewing <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > Huh? We do that all the time. We won't let you control when memory is > > deallocated. > > I hardly think that being able to kill threads is > anywhere near as dangerous as being able to scribble

Re: [Python-3000] python-safethread project status

2008-04-07 Thread Greg Ewing
Guido van Rossum wrote: > Maybe it should be a forked subprocess then, if it doesn't touch > anything shared? It might be taking and returning large data structures that it would be tedious to transfer between processes. Pickling them might not be straightforward if they contain references to obj

Re: [Python-3000] Types and classes

2008-04-07 Thread Greg Ewing
Terry Reedy wrote: > As in > print(type(3)) > > int # instead of I have the same feeling there -- the only time I'm likely to be deliberately printing a class is for debugging, and then I want unambiguity. -- Greg ___ Python-3000 mailing list

Re: [Python-3000] Types and classes

2008-04-07 Thread Greg Ewing
Guido van Rossum wrote: > what do people think of making the str() of a class > return just the thing between '...' in the repr()? Are you talking about the class itself, or instances of the class? If the latter, I'm not sure I like that idea. Very often I write thing like 'print "foo =", foo' as

Re: [Python-3000] python-safethread project status

2008-04-07 Thread Guido van Rossum
[catching up on old threads] On Tue, Mar 18, 2008 at 5:47 PM, Greg Ewing <[EMAIL PROTECTED]> wrote: > Adam Olsen wrote: > > I'd tend to assume only *purely* functional languages should have > > asynchronous interrupts. Any imperative language with them is > > suspect. > > Yet there are situat

Re: [Python-3000] PEP: Cleaning out sys and the "interpreter" module

2008-04-07 Thread Benjamin Peterson
On Mon, Apr 7, 2008 at 6:19 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On Mon, Apr 7, 2008 at 3:04 PM, Benjamin Peterson > <[EMAIL PROTECTED]> wrote: > > On Mon, Apr 7, 2008 at 4:45 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > > -0.5 from me. For half of the names that the PEP propo

Re: [Python-3000] PEP: Cleaning out sys and the "interpreter" module

2008-04-07 Thread Guido van Rossum
On Mon, Apr 7, 2008 at 3:04 PM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: > On Mon, Apr 7, 2008 at 4:45 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > -0.5 from me. For half of the names that the PEP proposes to move most > > users wouldn't be able to guess in which module to find them. >

Re: [Python-3000] readinto annotation

2008-04-07 Thread Benjamin Peterson
On Mon, Apr 7, 2008 at 10:11 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Mon, Apr 7, 2008 at 6:11 AM, Antoine Pitrou <[EMAIL PROTECTED]> > wrote: > > Gregory P. Smith krypto.org> writes: > > > > > > yes bytearray makes more sense to me given that its hard to read into > an > > immutab

Re: [Python-3000] PEP: Cleaning out sys and the "interpreter" module

2008-04-07 Thread Robert Brewer
Guido van Rossum wrote: > Benjamin Peterson wrote: > > After a long conversation on the stdlib-sig list, I'd like to > > bring this before you. For those of you not on the peps mailing > > list, Guido has expressed lukewarmness (well -0.5) to the idea. > > However, I'd still like your comments on m

Re: [Python-3000] PEP: Cleaning out sys and the "interpreter" module

2008-04-07 Thread Benjamin Peterson
On Mon, Apr 7, 2008 at 4:45 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > -0.5 from me. For half of the names that the PEP proposes to move most > users wouldn't be able to guess in which module to find them. > If they're in *one* (maybe two; we'll see.) other module, it'd be hard to guess whe

Re: [Python-3000] PEP: Cleaning out sys and the "interpreter" module

2008-04-07 Thread Guido van Rossum
-0.5 from me. For half of the names that the PEP proposes to move most users wouldn't be able to guess in which module to find them. On Mon, Apr 7, 2008 at 2:41 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Benjamin Peterson wrote: > > After a long conversation on the stdlib-sig list, I'd like to

Re: [Python-3000] PEP: Cleaning out sys and the "interpreter" module

2008-04-07 Thread Nick Coghlan
Benjamin Peterson wrote: > After a long conversation on the stdlib-sig list, I'd like to bring this > before you. For those of you not on the peps mailing list, Guido has > expressed lukewarmness (well -0.5) to the idea. However, I'd still like > your comments on my first PEP. +1 from me. > Th

[Python-3000] PEP: Cleaning out sys and the "interpreter" module

2008-04-07 Thread Benjamin Peterson
After a long conversation on the stdlib-sig list, I'd like to bring this before you. For those of you not on the peps mailing list, Guido has expressed lukewarmness (well -0.5) to the idea. However, I'd still like your comments on my first PEP. PEP: XXX Title: Cleaning out sys and the "interpreter

Re: [Python-3000] Types and classes

2008-04-07 Thread Terry Reedy
"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |> Could not find this in tracker, so http://bugs.python.org/issue2565 | | And thanks to Martin for making it so. | | As a follow-up, what do people think of making the str() of a class | return just the thing between

Re: [Python-3000] Types and classes

2008-04-07 Thread Guido van Rossum
> Could not find this in tracker, so http://bugs.python.org/issue2565 And thanks to Martin for making it so. As a follow-up, what do people think of making the str() of a class return just the thing between '...' in the repr()? This is much shorter and in many cases enough. (This actually inver

Re: [Python-3000] r62195 - in python/trunk: Doc/c-api/file.rst Include/fileobject.h Lib/test/test_file.py Misc/NEWS Objects/fileobject.c

2008-04-07 Thread Guido van Rossum
Right, this doesn't apply to py3k files at all. (Not that py3k files are all that thead-safe. :-) On Mon, Apr 7, 2008 at 8:42 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > gregory.p.smith schrieb: > > > Author: gregory.p.smith > > Date: Mon Apr 7 01:11:17 2008 > > New Revision: 62195 > > >

Re: [Python-3000] r62195 - in python/trunk: Doc/c-api/file.rst Include/fileobject.h Lib/test/test_file.py Misc/NEWS Objects/fileobject.c

2008-04-07 Thread Christian Heimes
gregory.p.smith schrieb: > Author: gregory.p.smith > Date: Mon Apr 7 01:11:17 2008 > New Revision: 62195 > > Modified: >python/trunk/Doc/c-api/file.rst >python/trunk/Include/fileobject.h >python/trunk/Lib/test/test_file.py >python/trunk/Misc/NEWS >python/trunk/Objects/fileobje

Re: [Python-3000] readinto annotation

2008-04-07 Thread Guido van Rossum
On Mon, Apr 7, 2008 at 6:11 AM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > Gregory P. Smith krypto.org> writes: > > > > yes bytearray makes more sense to me given that its hard to read into an > immutable bytes object ;) > > It seems to me that readinto accepts any object providing a writeabl

Re: [Python-3000] readinto annotation

2008-04-07 Thread Antoine Pitrou
Gregory P. Smith krypto.org> writes: > > yes bytearray makes more sense to me given that its hard to read into an immutable bytes object ;) It seems to me that readinto accepts any object providing a writeable buffer interface. I don't know how to express that as an annotation, though. __

Re: [Python-3000] readinto annotation

2008-04-07 Thread Amaury Forgeot d'Arc
On Mon, Apr 7, 2008 at 2:00 AM, Gregory P. Smith <[EMAIL PROTECTED]> wrote: > yes bytearray makes more sense to me given that its hard to read into an > immutable bytes object ;) Not so hard: http://bugs.python.org/issue2538 Some time ago, bytes were mutable... -- Amaury Forgeot d'Arc __