2011-10-19 18:34:29 Arfrever Frehtes Taifersar Arahesis napisał(a):
> try:
>     from pickle import PickleError
> except ImportError:
>     from nonexistent import PickleError

Please note that such a code is actually useful for imports specific to Python 
version:

try:
    # Python 3
    from http.client import HTTPException
except ImportError:
    # Python 2
    from httplib import HTTPException

-- 
Arfrever Frehtes Taifersar Arahesis

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to