Message2230
This patch adds some Python 2.2 features, just enough
to meet the first few test cases from test_descr.py,
which contains the test cases for the Type/Class
Unification of Python2.2. test_descr.py is included
as Lib/test/test_descr_lists.py (test cases not
implemented commented out).
With this patch you can
- compare builtin methods (more correctly, I hope),
e.g.
>>> a=[1]
>>> b=[2]
>>> type(a).append == type(b).append
1 # was 0
- call methods with no implicit parameter, i.e.
>>> import types
>>> a=[1]
>>> m=types.ListType.append # m=list.append not yet
possible
>>> m(a,2)
# was "TypeError: append(): expected 1 args; got 2"
before
>>> a
[1, 2]
- do some more things with lists
See test_descr_lists.py for details on what can be
done now.
Apart from test_descr_lists I tested with bugtests.
By applying the patch I had the same twelve tests
failing than before. Hmmm.
If the direction is right I can spend some more time
on implementing more of the tests for the Type/Class
Unification.
|
|
| Date |
User |
Action |
Args |
| 2008-02-20 17:18:18 | admin | link | issue532168 messages |
| 2008-02-20 17:18:18 | admin | create | |
|