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
These all look good to me. The "short circuit" import syntax and semantics are compact and intuitive. > * import readline or emptymodule This I find more problematic as "emptymodule" seems too magical. Even now any code that wants to use a module that might not have been successfully imported needs to check if that's the case. E.g., a fuller current use-case would be: try: readline = None import readline except ImportError: pass if readline is not None: readline.foo() ... Conceivably emptymodule could act as a Null object but that could create more problems than it solves. John _______________________________________________ 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