[Python-checkins] CVS: python/dist/src/Lib/test test_extcall.py,1.6,1.7

Jeremy Hylton python-dev@python.org
Mon, 30 Oct 2000 09:15:22 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv32349/Lib/test

Modified Files:
	test_extcall.py 
Log Message:
Fix for SF bug #117241

When a method is called with no regular arguments and * args, defer
the first arg is subclass check until after the * args have been
expanded. 

N.B. The CALL_FUNCTION implementation is getting really hairy; should
review it to see if it can be simplified.



Index: test_extcall.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_extcall.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** test_extcall.py	2000/10/23 17:22:07	1.6
--- test_extcall.py	2000/10/30 17:15:20	1.7
***************
*** 145,146 ****
--- 145,164 ----
  a, b = f2(1, *(2, 3), **d)
  print len(a), len(b), b == d
+ 
+ class Foo:
+     def method(self, arg1, arg2):
+         return arg1 + arg2
+ 
+ x = Foo()
+ print Foo.method(*(x, 1, 2))
+ print Foo.method(x, *(1, 2))
+ try:
+     print Foo.method(*(1, 2, 3))
+ except TypeError, err:
+     print err
+ try:
+     print Foo.method(1, *(2, 3))
+ except TypeError, err:
+     print err
+ 
+