[Python-Dev] Re: [Stackless] comments on PEP 219

Greg Ewing greg at cosc.canterbury.ac.nz
Wed Mar 14 02:28:49 CET 2001


Gordon McMillan <gmcm at hypernet.com>:

> But magic methods are a convenience. There's 
> absolutely nothing there that can't be done another way.

Strictly speaking that's true, but from a practical standpoint
I think you will *have* to address __init__ at least, because
it is so ubiquitous and ingrained in the Python programmer's
psyche. Asking Python programmers to give up using __init__
methods will be greeted with about as much enthusiasm as if
you asked them to give up using all identifiers containing
the leter 'e'. :-)

>  - a GUI. Again, no big deal

Sorry, but I think it *is* a significantly large deal...

> be careful that the other threads don't 
> touch the GUI directly. It's basically the same issue with 
> Stackless.

But the other threads don't have to touch the GUI directly
to be a problem.

Suppose I'm building an IDE and I want a button which spawns
a microthread to execute the user's code. The thread doesn't
make any GUI calls itself, but it's spawned from inside a
callback, which, if I understand correctly, will be impossible.

> The one comparable situation 
> in normal Python is crossing threads in callbacks. With the 
> exception of a couple of complete madmen (doing COM 
> support), everyone else learns to avoid the situation.

But if you can't even *start* a thread using a callback,
how do you do anything with threads at all?

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

_______________________________________________
Python-Dev mailing list
Python-Dev at python.org
http://mail.python.org/mailman/listinfo/python-dev



More information about the Stackless mailing list