summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Fenn <michaelfenn87@gmail.com>2015-03-19 15:10:44 -0400
committerMichael Fenn <michaelfenn87@gmail.com>2015-03-19 15:10:44 -0400
commit16d3e04cb80a975eef0e0ad6f0f6dc4800860d3c (patch)
tree3ca0eee8c3ebb3c47e96acf59171fe3784cf2752 /doc
parentc8863b9a2dadacdacf433cbb818735c32e8f83a8 (diff)
downloadbcfg2-16d3e04cb80a975eef0e0ad6f0f6dc4800860d3c.tar.gz
bcfg2-16d3e04cb80a975eef0e0ad6f0f6dc4800860d3c.tar.bz2
bcfg2-16d3e04cb80a975eef0e0ad6f0f6dc4800860d3c.zip
compat: use eval instead of ast.literal_eval on python 2.4
Diffstat (limited to 'doc')
-rw-r--r--doc/development/compat.txt10
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
-------------