Open bnuzhouwei opened 8 months ago
There is no equivalent class for OldInstance
in IronPython 3 since the concept was removed from Python. To get the member names maybe you could try DynamicHelpers.GetPythonType(o).GetMemberNames(DefaultContext.Default, o)
.
So, What is the base type of the following class, so we can detect the return value is a OldInstance instance:
class Test:
pass
Test()
if(return_value is OldInstance) { // so logic }
There is no common type. Test()
is of type Test
. The class definition is the same if you had written the following in IronPython 2:
class Test(object): pass
In ironpython2:
return as IronPython.Runtime.Types.OldInstance and it can as Microsoft.Scripting.Runtime.IMembersList, then all membernames can be got, what's the corrensponding class in IronPython3