diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-28 06:09:03 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-28 06:09:03 (GMT) |
commit | 2befd247e95b0776fff71524a7cb604facd4b634 (patch) | |
tree | 38591a0024c737cac29a8de8139c255a0c8a41a7 | |
parent | 6d199ef14b577a71bb0ad6e69199151df94721ba (diff) | |
download | cpython-2befd247e95b0776fff71524a7cb604facd4b634.zip cpython-2befd247e95b0776fff71524a7cb604facd4b634.tar.gz cpython-2befd247e95b0776fff71524a7cb604facd4b634.tar.bz2 |
Don't encourage 'from types import *' in the types module's docs.
-rw-r--r-- | Doc/library/types.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/library/types.rst b/Doc/library/types.rst index c636a73..9cc188c 100644 --- a/Doc/library/types.rst +++ b/Doc/library/types.rst @@ -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] |