Any other Python flaws?

Mitch Chapman chapman at bioreason.com
Fri Jun 15 14:25:16 EDT 2001


Andrew Kuchling wrote:
> 
> I was updating my page of possible Python design flaws
> (http://www.amk.ca/python/writing/warts.html) last night to take 2.1
> into account.  2.1's nested scoping fixes one major wart, and the
> other major one, the type/class dichotomy, might get fixed in 2.2 if
> the descr-branch in CVS turns out well.  (It's neat that the two
> largest ones may both get fixed before 2001 is out.)
> 
> That leaves the remaining warts as minor wibbling about 'do'
> statements, print >>, and the like.  Are there any other flaws that
> should be added?
> 
> --amk


I suspect from some of your follow-ups that "uncancellable threads" 
does not fit the purpose of your design flaws page, and in any
case it's covered by a PEP (42?).  Even so, since the problem 
extends across all platforms I'll propose it.

The fact that threads cannot be cancelled -- except when 
they are written to permit "cooperative" cancellation -- limits 
their usefulness.  If you need cancellable long-running background
computations, the only reasonable solution is often a convoluted
subtask management framework.

I've been lucky in needing such a framework only for Unix 
variants.  Variations in IPC semantics among the major OS
platforms would make a cross-platform subtask management framework 
even harder to maintain.

-- 
Mitch Chapman
Mitch.Chapman at bioreason.com



More information about the Python-list mailing list