main
main copied to clipboard
different exception be cautht against Ironpython and Cpython.
different exception be cautht against Ironpython and Cpython.
detail Info pls watch Repro Snippet.
E:\IronPyTestFor2.5\ironpythonCompatableFor2.5\ironpythonCompatableFor2.5\25\L ib
ipy
IronPython console: IronPython 2.0A5 (2.0.11011.00) on .NET 2.0.50727.1318
Copyright (c) Microsoft Corporation. All rights reserved.class Nothing:
... pass
...
def g(x, _y, *_z):
... print x, y, sortdict(z)
...
def g(x, _y, *_z):
... print x, y, sortdict(z)
...
g(Nothing())
Traceback (most recent call last):
File , line 0, in ##250
File , line 0, in stub##252
File , line 0, in stub##253
AttributeError: 'Nothing' object has no attribute ' * len ** '
def h(j=1, a=2, h=3):
... print j, a, h
...
dir(*h)
Traceback (most recent call last):
File , line 0, in ##257
SystemError: Object reference not set to an instance of an object.
^Z
E:\IronPyTestFor2.5\ironpythonCompatableFor2.5\ironpythonCompatableFor2.5\25\L
ib
python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on
win32
Type ";help";, ";copyright";, ";credits"; or ";license"; for more information.
class Nothing:
... pass
...
def g(x,_y,__z):
... print x,y,sortdict(z)
...
g(_Nothing())
Traceback (most recent call last):
File ";";, line 1, in
TypeError: g() argument after * must be a sequence
def h(j=1, a=2, h=3):
... print j, a, h
...
dir(*h)
Traceback (most recent call last):
File ";";, line 1, in
TypeError: dir() argument after * must be a sequence
Work Item Details
Original CodePlex Issue: Issue 23794 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: Jul 27, 2009 at 11:53 PM Reported by: dfugate Updated on: Feb 22, 2013 at 2:12 AM Updated by: jdhardy Custom value: Reported internally at Microsoft. Test: test_extcall.py CreatedDate: 10/25/2007 NewInternalID: 409593 OldInternalID: 316147 AreaPath: IronPython
This one is still giving an AttributeError
instead of a TypeError
:
class Nothing:
pass
def g(x, *y, **z):
print x, y, sortdict(z)
g(*Nothing())