[Python.NET] tuple not recognized as a type ?

Grégoire Dooms gregoire.dooms at gmail.com
Fri May 1 17:50:05 CEST 2009


Hello,
I have been trying to use tuple as a generic type argument:
In [4]: from System.Collections.Generic import List
In [5]:
In [6]: x = List[int](range(4))
In [7]: x = List[tuple]([() for t in range(4)])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

h:\python\testPyNet.py in <module>()
----> 1
      2
      3
      4
      5

TypeError: type(s) expected

I had a similar problem in a generic method of a non-generic class.

I have two questions:
* Is there a work around ?
* How do you debug python for .NET ?
  I tried to attach a Visual Studio 2005 debugger to the python process and
break in ClassObject.type_subscript but VS does not load the symbols.

Thanks for this project, I would love to use it.
--
Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20090501/43b35593/attachment.htm>


More information about the PythonDotNet mailing list