* Remove PRINT_ITEM(_TO), PRINT_NEWLINE(_TO) opcodes.
* Fix some docstrings and one Print -> print.
* Fix test_{class,code,descrtut,dis,extcall,parser,popen,pkg,subprocess,syntax,traceback}.
These were the ones that generated code with a print statement.
In most remaining failing tests there's an issue with the soft space.
diff --git a/Lib/test/test_descrtut.py b/Lib/test/test_descrtut.py
index 3351b67..001aa49 100644
--- a/Lib/test/test_descrtut.py
+++ b/Lib/test/test_descrtut.py
@@ -36,28 +36,28 @@
Here's the new type at work:
- >>> print(defaultdict) # show our type
+ >>> print(defaultdict) # show our type
<class 'test.test_descrtut.defaultdict'>
- >>> print(type(defaultdict)) # its metatype
+ >>> print(type(defaultdict)) # its metatype
<type 'type'>
>>> a = defaultdict(default=0.0) # create an instance
- >>> print(a) # show the instance
+ >>> print(a) # show the instance
{}
- >>> print(type(a)) # show its type
+ >>> print(type(a)) # show its type
<class 'test.test_descrtut.defaultdict'>
- >>> print(a.__class__) # show its class
+ >>> print(a.__class__) # show its class
<class 'test.test_descrtut.defaultdict'>
- >>> print(type(a) is a.__class__) # its type is its class
+ >>> print(type(a) is a.__class__) # its type is its class
True
>>> a[1] = 3.25 # modify the instance
- >>> print(a) # show the new value
+ >>> print(a) # show the new value
{1: 3.25}
- >>> print(a[1]) # show the new item
+ >>> print(a[1]) # show the new item
3.25
- >>> print(a[0]) # a non-existant item
+ >>> print(a[0]) # a non-existant item
0.0
>>> a.merge({1:100, 2:200}) # use a dict method
- >>> print(sortdict(a)) # show the result
+ >>> print(sortdict(a)) # show the result
{1: 3.25, 2: 200}
>>>
@@ -67,10 +67,11 @@
>>> print(sorted(a.keys()))
[1, 2]
- >>> exec("x = 3; print x", a)
+ >>> a['print'] = print # need the print function here
+ >>> exec("x = 3; print(x)", a)
3
>>> print(sorted(a.keys(), key=lambda x: (str(type(x)), x)))
- [1, 2, '__builtins__', 'x']
+ [1, 2, '__builtins__', 'print', 'x']
>>> print(a['x'])
3
>>>