[Python-checkins] r81577 - peps/trunk/pep-3147.txt

barry.warsaw python-checkins at python.org
Fri May 28 01:54:25 CEST 2010


Author: barry.warsaw
Date: Fri May 28 01:54:25 2010
New Revision: 81577

Log:
Add good suggestion on how to tell if you have PEP 3147 support.

Modified:
   peps/trunk/pep-3147.txt

Modified: peps/trunk/pep-3147.txt
==============================================================================
--- peps/trunk/pep-3147.txt	(original)
+++ peps/trunk/pep-3147.txt	Fri May 28 01:54:25 2010
@@ -348,6 +348,16 @@
 Python and outside.  This section enumerates some of these effects.
 
 
+Detecting PEP 3147 availability
+-------------------------------
+
+The easiest way to detect whether your version of Python provides PEP
+3147 functionality is to do the following check::
+
+    >>> import imp
+    >>> has3147 = hasattr(imp, 'get_tag')
+
+
 __file__
 ---------
 


More information about the Python-checkins mailing list