[Python-3000-checkins] r57604 - in python/branches/py3k: Doc/library/types.rst
collin.winter
python-3000-checkins at python.org
Tue Aug 28 08:09:04 CEST 2007
Author: collin.winter
Date: Tue Aug 28 08:09:03 2007
New Revision: 57604
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Doc/library/types.rst
Log:
Don't encourage 'from types import *' in the types module's docs.
Modified: python/branches/py3k/Doc/library/types.rst
==============================================================================
--- python/branches/py3k/Doc/library/types.rst (original)
+++ python/branches/py3k/Doc/library/types.rst Tue Aug 28 08:09:03 2007
@@ -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]
More information about the Python-3000-checkins
mailing list