diff options
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/compat.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/development/compat.txt b/doc/development/compat.txt index 8700c46d3..5ac08ea68 100644 --- a/doc/development/compat.txt +++ b/doc/development/compat.txt @@ -129,6 +129,8 @@ below, since some of these implementations may be feature-incomplete. +----------------+--------------------------------+--------------------------------------------+ | MutableMapping | :class:`UserDict.DictMixin` | :class:`collections.MutableMapping` (2.6+) | +----------------+--------------------------------+--------------------------------------------+ +| literal_eval | :func:`ast.literal_eval` | :func:`eval` | ++----------------+--------------------------------+--------------------------------------------+ walk_packages ~~~~~~~~~~~~~ @@ -171,6 +173,14 @@ mind. :class:`collections.MutableMapping` is available in Python 2.6+, and will be used if available. +literal_eval +~~~~~~~~~~~~ + +:func:`ast.literal_eval` is a safe version of :func:`eval` that will only +allow delaration of literal strings, ints, list, dicts, etc. This was +introduced in Python 2.6, and as such Python 2.4 uses the plain-old +:func:`eval`. + Other Symbols ------------- |