Chris Withers wrote:
Every time I see things like the following I cry a little inside:try: try: from py2stdliblocation import FooBar as Foo except ImportError: from py3stdliblocation import foo as Foo except ImportError: from pypilocation import Foo
The syntax is inelegant, but the concept is straightforward and simple and not worth tears.
"I need a thing called Foo, which can be found here, or here, or here. Use the first one found."
In principle this is not terribly different from the idea of a search PATH when looking for an executable, except the executable can be found under different names as well as different locations.
Now we're talking about having to add __preview__ into that mix too?
As I understand it, Guido nixed that idea. (Or did I imagine that?) Preview modules will be just added to the std lib as normal, and you have to read the docs to find out they're preview.
-- Steven _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
