On 3 jan 2008, at 02.19, Raymond Hettinger wrote:
> How about a new, simpler syntax:
>
> * import threading or dummy_threading as threading
>
> * import xml.etree.CElementTree or cElementTree or  
> elementree.ElementTree as ET
>
> * from cStringIO or StringIO import StringIO
>
> * import readline or emptymodule

Wouldn't a (stdlib) function suffice in the cases where this is needed?

ET = import_with_alternative("xml.etree.CElementTree", "cElementTree",  
"elementtree.ElementTree")

It's not as elegant, but it's easier than status quo.

//Simon
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to