A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-January/075805.html below:

[Python-Dev] Syntax suggestion for imports

[Python-Dev] Syntax suggestion for imports [Python-Dev] Syntax suggestion for importsAahz aahz at pythoncraft.com
Thu Jan 3 19:11:58 CET 2008
On Wed, Jan 02, 2008, Raymond Hettinger wrote:
>
> Before posting, I ran some scans of our code base at work and found
> plenty of examples (mostly third-party cmodules vs python equivalents
> and a few that searched for similar functionality in different
> packages).  It might be helpful if others were to also search their
> own code bases and post their findings:
>
>   find . -name "*py" | xargs grep -C2 ImportError *py

Most of my company's examples fall into cases like this:

try:
    klass = load_class(foo)
except ImportError:
    klass = NullClass
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote 
programs, then the first woodpecker that came along would destroy civilization.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4