[Python-Dev] Breaking undocumented API (original) (raw)

Tres Seaver tseaver at palladion.com
Tue Nov 9 23:12:00 CET 2010


-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

On 11/09/2010 03:48 PM, Toshio Kuratomi wrote:

I think there's a valid case for bogarting the namespace in this instance, but let me know if there's a better way to do it::

# Method to use system libraries if available, otherwise use a bundled copy, # aka: make both system packagers and developers happy::

Relevant directories and files for this module:: + foo/ +- init.py ++ compat/ +- init.py ++ bar/ +- init.py +- bar.py foo/compat/bar/bar.py is a bundled module. foo/compat/bar/init.py has: try: from bar import * from bar import all except ImportError:: from foo.compat.bar.bar import * from foo.compat.bar.bar import all

I guess the usual caveats apply for dopplegangers / proxies. ;)

Tres. - --

Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzZxzAACgkQ+gerLs4ltQ5UsgCfcaxeFruJCDGnxBA0ma8Pjggg lW8AoMBx2FYg+PSA/Zbq94UbiPhKGnjO =/8QU -----END PGP SIGNATURE-----



More information about the Python-Dev mailing list