summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-04-20 17:23:26 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-04-20 17:23:26 (GMT)
commit6f205ed37eb4b785b60081f957d515ca16b0db47 (patch)
tree4eae61a6207bdd98e0793dc58686c1923d7a4d72
parentf97255fd7c1d2b70dfe8032a54ce3ce0daf4cea3 (diff)
parent87f3a9aac7f4b324f10b23adb1e79ad6b69117ae (diff)
downloadcpython-6f205ed37eb4b785b60081f957d515ca16b0db47.zip
cpython-6f205ed37eb4b785b60081f957d515ca16b0db47.tar.gz
cpython-6f205ed37eb4b785b60081f957d515ca16b0db47.tar.bz2
Branch merge
-rw-r--r--Lib/ast.py4
-rw-r--r--Lib/sysconfig.py1
-rw-r--r--Lib/trace.py2
3 files changed, 3 insertions, 4 deletions
diff --git a/Lib/ast.py b/Lib/ast.py
index 72237ed..fb5adac 100644
--- a/Lib/ast.py
+++ b/Lib/ast.py
@@ -40,8 +40,8 @@ def literal_eval(node_or_string):
"""
Safely evaluate an expression node or a string containing a Python
expression. The string or node provided may only consist of the following
- Python literal structures: strings, numbers, tuples, lists, dicts, booleans,
- and None.
+ Python literal structures: strings, bytes, numbers, tuples, lists, dicts,
+ sets, booleans, and None.
"""
_safe_names = {'None': None, 'True': True, 'False': False}
if isinstance(node_or_string, str):
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 685c84e..3b0ca85 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -694,7 +694,6 @@ def get_platform():
m = re.search(
r'<key>ProductUserVisibleVersion</key>\s*' +
r'<string>(.*?)</string>', f.read())
- f.close()
if m is not None:
macrelease = '.'.join(m.group(1).split('.')[:2])
# else: fall back to the default behaviour
diff --git a/Lib/trace.py b/Lib/trace.py
index 53c6150..850369b 100644
--- a/Lib/trace.py
+++ b/Lib/trace.py
@@ -688,7 +688,7 @@ def main(argv=None):
for opt, val in opts:
if opt == "--help":
- usage(sys.stdout)
+ _usage(sys.stdout)
sys.exit(0)
if opt == "--version":