SF #506611, fix sys.setprofile(), sys.settrace() core dumps
when no arguments are passed
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index bb29f8b..85cfed4 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -471,6 +471,10 @@
 adaptgetter("foo", TestClass, (1, ""))
 sys.settrace(None)
 
+try: sys.settrace()
+except TypeError: pass
+else: raise TestFailed, 'sys.settrace() did not raise TypeError'
+
 print "20. eval and exec with free variables"
 
 def f(x):