[Python-Dev] Syntax suggestion for imports
Facundo Batista
facundobatista at gmail.com
Thu Jan 3 20:19:08 CET 2008
2008/1/2, Raymond Hettinger <python at rcn.com>:
> 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
With the minor modification of changing emptymodule by a None in the
last line, I'm +0 on it.
I don't use this that much, but I find this syntax clear and
understable. It does not bring additional complexity when not used,
and is very helpful when needed.
Don't know how much effort for the parser it is, though.
Regards,
--
. Facundo
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
More information about the Python-Dev
mailing list