[Python-Dev] Python 2.4.2 documentation online

2005-09-27 Thread Fred L. Drake, Jr.
The Python 2.4.2 documentation is now online in the main documentation area (as opposed to just the /dev/ area) for both www.python.org and docs.python.org. The 2.4 and 2.4.1 documentation areas have been updated to link to the 2.4.2 documentation as the preferred documentation for all 2.4.x r

Re: [Python-Dev] Active Objects in Python

2005-09-27 Thread Bruce Eckel
Oops. I forgot to add that to the list. Yes, in the working example of Active Objects that I've written in Java J2SE5, when you send a message to an active object, you get back a Future, which I suspect would be the same as your Deferred. Tuesday, September 27, 2005, 7:41:27 PM, Christopher Armstr

Re: [Python-Dev] Active Objects in Python

2005-09-27 Thread Christopher Armstrong
On 9/28/05, Greg Ewing <[EMAIL PROTECTED]> wrote: > Nick Coghlan wrote: > > > PEP 342's yield expressions can probably be used to help address that > > problem, > > though: > > > >class SomeAO(ActiveObject): > > def processSomeMessage(self): > >msg = yield > ># Do somethin

Re: [Python-Dev] Active Objects in Python

2005-09-27 Thread Greg Ewing
Nick Coghlan wrote: > PEP 342's yield expressions can probably be used to help address that > problem, > though: > >class SomeAO(ActiveObject): > def processSomeMessage(self): >msg = yield ># Do something with the message >next_msg = yield makeSomeBlockingCall(s

Re: [Python-Dev] Active Objects in Python

2005-09-27 Thread Nick Coghlan
Bruce Eckel wrote: > Since the enqueuing process serializes all requests to active objects, > and since each message-task runs to completion before the next one > starts, the problem of threads interfering with each other is > eliminated. Also, the enqueuing process will always happen, so even if >

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-27 Thread Nick Coghlan
Gustavo J. A. M. Carneiro wrote: > More realistic example: > > def greet(person=None): > print "Hello %s" % (if person is None: "World" else: person) > > Not as compact as C's ?:, but more readable and intuitive. It's just > like an if-else construct, but on a single line and () ar

Re: [Python-Dev] Fixing pty.spawn()

2005-09-27 Thread Gustavo Barbieri
The attached patch calls ioctl() to set master_fd win size. I use fcntl and struct modules, I have hardcoded values from termios since this module is deleted. Is it ok? -- Gustavo Sverzut Barbieri --- Computer Engineer 2001 - UNICAMP GPSL - Grupo Pro Software

Re: [Python-Dev] PEP 350: Codetags

2005-09-27 Thread Josiah Carlson
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote: > At 03:35 PM 9/26/2005 -0700, Micah Elliott wrote: > >Please read/comment/vote. This circulated as a pre-PEP proposal > >submitted to c.l.py on August 10, but has changed quite a bit since > >then. I'm reposting this since it is now "Open (under consi

Re: [Python-Dev] Active Objects in Python

2005-09-27 Thread Benji York
Phillip J. Eby wrote: > Well, you could pickle and unpickle the objects you send from one function > to another, and for cross-process communication, you'll need to do > something like that anyway, or else use that shared-memory objects > thing. PySHM? I don't remember its name, but it's an ex

Re: [Python-Dev] Active Objects in Python

2005-09-27 Thread Phillip J. Eby
At 11:18 AM 9/27/2005 -0600, Bruce Eckel wrote: >Yes, defining an class as "active" would: >1) Install a worker thread and concurrent queue in each object of that >class. >2) Automatically turn method calls into tasks and enqueue them >3) Prevent any other interaction other than enqueued messages

[Python-Dev] Active Objects in Python

2005-09-27 Thread Bruce Eckel
According to this list's welcome message, I should introduce myself. I'm Bruce Eckel, I write, consult and give seminars about computer programming, I use Python whenever I can get away with it, and I've spoken at Pycon a number of times. There are further URLs in my signature at the bottom. I'm j

Re: [Python-Dev] PEP 350: Codetags

2005-09-27 Thread Phillip J. Eby
At 03:35 PM 9/26/2005 -0700, Micah Elliott wrote: >Please read/comment/vote. This circulated as a pre-PEP proposal >submitted to c.l.py on August 10, but has changed quite a bit since >then. I'm reposting this since it is now "Open (under consideration)" >at

[Python-Dev] Fixing pty.spawn()

2005-09-27 Thread Gustavo Barbieri
Hello, I've come to a problem with pty.spawn() as it states on its source code: # Bugs: No signal handling. Doesn't set slave termios and window size. As I need this feature working, I want to fix this bug. Does someone have any idea on how to fix it? (My problem: I want to launch ncurses soft

Re: [Python-Dev] PEP 350: Codetags

2005-09-27 Thread Fredrik Lundh
Guido van Rossum wrote: > It has always been my choice to *only* use XXX. I hope there aren't > any developers contributing to the Python core who use any others? [Python-2.4.1]$ grep FIXME */*.c */*.py | wc -l 12 [Python-2.4.1]$ grep TODO */*.c */*.py | wc -l 17 [Python-2.4.1]$ grep XX

Re: [Python-Dev] PEP 350: Codetags

2005-09-27 Thread Guido van Rossum
On 9/26/05, Neil Schemenauer <[EMAIL PROTECTED]> wrote: > Micah Elliott <[EMAIL PROTECTED]> wrote: > > ``FIXME (XXX, DEBUG, BROKEN, REFACTOR, REFACT, RFCTR, OOPS, SMELL, > > NEEDSWORK, INSPECT)`` > >*Fix me*: Areas of problematic or ugly code needing refactoring or > >cleanup. > > I think

[Python-Dev] PEP 350: Codetags

2005-09-27 Thread Micah Elliott
Please read/comment/vote. This circulated as a pre-PEP proposal submitted to c.l.py on August 10, but has changed quite a bit since then. I'm reposting this since it is now "Open (under consideration)" at . Thanks! -- Micah Elliott PEP: 350 Title: C

[Python-Dev] Adding a conditional expression in Py3.0

2005-09-27 Thread Sokolov Yura
New keyword is so expensive? And why special case for 'then' is better than special case for 'take'? ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-27 Thread Gustavo J. A. M. Carneiro
On Sun, 2005-09-25 at 19:11 +0200, Reinhold Birkenfeld wrote: > Sokolov Yura wrote: > > Sorry for looking in every hole. > > Just a suggestion. > > > > A= condition and first or second > > problem is in case when first in (None,0,[],""). > > May be invent new operator 'take'. > > take - returns r