]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't encourage 'from types import *' in the types module's docs.
authorCollin Winter <collinw@gmail.com>
Tue, 28 Aug 2007 06:09:03 +0000 (06:09 +0000)
committerCollin Winter <collinw@gmail.com>
Tue, 28 Aug 2007 06:09:03 +0000 (06:09 +0000)
Doc/library/types.rst

index c636a73b0f8dce340fb34b7a2bfec1429b430abf..9cc188c4c78897878fbd6d1aa2f4d69fce9dfe6d 100644 (file)
@@ -9,14 +9,13 @@
 This module defines names for some object types that are used by the standard
 Python interpreter, but not for the types defined by various extension modules.
 Also, it does not include some of the types that arise during processing such as
-the ``listiterator`` type. It is safe to use ``from types import *`` --- the
-module does not export any names besides the ones listed here. New names
-exported by future versions of this module will all end in ``Type``.
+the ``listiterator`` type. New names exported by future versions of this module
+will all end in ``Type``.
 
 Typical use is for functions that do different things depending on their
 argument types, like the following::
 
-   from types import *
+   from types import IntType
    def delete(mylist, item):
        if type(item) is IntType:
           del mylist[item]