Merged revisions 73196,73278-73280,73299,73308,73312-73313,73317-73318,73321,73324,73331,73335,73340,73363 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73196 | benjamin.peterson | 2009-06-03 20:40:29 -0500 (Wed, 03 Jun 2009) | 1 line

  use the offical api
........
  r73278 | benjamin.peterson | 2009-06-07 17:33:11 -0500 (Sun, 07 Jun 2009) | 1 line

  inherit from object
........
  r73279 | benjamin.peterson | 2009-06-07 17:35:00 -0500 (Sun, 07 Jun 2009) | 1 line

  always inherit from an appropiate base class
........
  r73280 | benjamin.peterson | 2009-06-07 17:54:35 -0500 (Sun, 07 Jun 2009) | 1 line

  use booleans for flags
........
  r73299 | georg.brandl | 2009-06-08 13:41:36 -0500 (Mon, 08 Jun 2009) | 1 line

  Typo fix.
........
  r73308 | benjamin.peterson | 2009-06-08 17:18:32 -0500 (Mon, 08 Jun 2009) | 1 line

  remove useless assertion
........
  r73312 | benjamin.peterson | 2009-06-08 18:44:13 -0500 (Mon, 08 Jun 2009) | 1 line

  remove error checks already done in set_context()
........
  r73313 | r.david.murray | 2009-06-08 19:44:22 -0500 (Mon, 08 Jun 2009) | 4 lines

  Issue 2947: document how return code handling translates from
  os.popen to subprocess.  Also fixes reference link in the
  os.spawn documentation.
........
  r73317 | benjamin.peterson | 2009-06-09 12:24:26 -0500 (Tue, 09 Jun 2009) | 1 line

  make ast.c depend on the grammar
........
  r73318 | benjamin.peterson | 2009-06-09 12:29:51 -0500 (Tue, 09 Jun 2009) | 1 line

  explain why keyword names are not just NAME
........
  r73321 | benjamin.peterson | 2009-06-09 16:13:43 -0500 (Tue, 09 Jun 2009) | 1 line

  update symbol.py from with statement changes
........
  r73324 | amaury.forgeotdarc | 2009-06-09 17:53:16 -0500 (Tue, 09 Jun 2009) | 2 lines

  Avoid invoking the parser/compiler just to test the presence of a function.
........
  r73331 | benjamin.peterson | 2009-06-10 08:45:31 -0500 (Wed, 10 Jun 2009) | 1 line

  fix spelling
........
  r73335 | raymond.hettinger | 2009-06-10 11:15:40 -0500 (Wed, 10 Jun 2009) | 1 line

  Fix signed/unsigned compiler warning.
........
  r73340 | amaury.forgeotdarc | 2009-06-10 15:30:19 -0500 (Wed, 10 Jun 2009) | 2 lines

  Fix a typo spotted by Nick Coghlan.
........
  r73363 | benjamin.peterson | 2009-06-11 12:51:17 -0500 (Thu, 11 Jun 2009) | 1 line

  use multi-with syntax
........
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py
index a3393d4..bbaf6d5 100644
--- a/Lib/multiprocessing/queues.py
+++ b/Lib/multiprocessing/queues.py
@@ -109,7 +109,7 @@
                 self._rlock.release()
 
     def qsize(self):
-        # Raises NotImplementError on Mac OSX because of broken sem_getvalue()
+        # Raises NotImplementedError on Mac OSX because of broken sem_getvalue()
         return self._maxsize - self._sem._semlock._get_value()
 
     def empty(self):
diff --git a/Lib/os.py b/Lib/os.py
index 65f88ba..5dce0c1 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -437,11 +437,7 @@
 __all__.append("getenv")
 
 def _exists(name):
-    try:
-        eval(name)
-        return True
-    except NameError:
-        return False
+    return name in globals()
 
 # Supply spawn*() (probably only for Unix)
 if _exists("fork") and not _exists("spawnv") and _exists("execv"):
diff --git a/Lib/symbol.py b/Lib/symbol.py
index 1b773d0..4b4c219 100755
--- a/Lib/symbol.py
+++ b/Lib/symbol.py
@@ -52,7 +52,7 @@
 for_stmt = 295
 try_stmt = 296
 with_stmt = 297
-with_var = 298
+with_item = 298
 except_clause = 299
 suite = 300
 test = 301
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 9b4e342..84028e8 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -1584,7 +1584,7 @@
 >>> def f(): (yield bar) += y
 Traceback (most recent call last):
   ...
-SyntaxError: augmented assignment to yield expression not possible
+SyntaxError: can't assign to yield expression
 
 
 Now check some throw() conditions:
diff --git a/Lib/test/test_genexps.py b/Lib/test/test_genexps.py
index 61e9fe5..1f46af1 100644
--- a/Lib/test/test_genexps.py
+++ b/Lib/test/test_genexps.py
@@ -142,7 +142,7 @@
     >>> (y for y in (1,2)) += 10
     Traceback (most recent call last):
        ...
-    SyntaxError: augmented assignment to generator expression not possible
+    SyntaxError: can't assign to generator expression
 
 
 ########### Tests borrowed from or inspired by test_generators.py ############
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index c82787e..c55171a 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -222,17 +222,17 @@
 SyntaxError: keyword can't be an expression
 
 
-From ast_for_expr_stmt():
+More set_context():
 
 >>> (x for x in x) += 1
 Traceback (most recent call last):
-SyntaxError: augmented assignment to generator expression not possible
+SyntaxError: can't assign to generator expression
 >>> None += 1
 Traceback (most recent call last):
 SyntaxError: assignment to keyword
 >>> f() += 1
 Traceback (most recent call last):
-SyntaxError: illegal expression for augmented assignment
+SyntaxError: can't assign to function call
 
 
 Test continue in finally in weird combinations.