The declaration of Python classes with generic type parameters is not supported today, and is not currently on my todo list for 1.0. I see generic types as vitally important in static languages like C#, but much less important for dynamic languages like Python. It's important for IronPython to be able to use these types, and even create new concrete instances like shown below, to interoperate as well as possible with .NET libraries. If I saw a strong case for why Python programmers should want to create new generic types then we might look into this sooner.
-Jim ________________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith J. Farmer Sent: Friday, April 01, 2005 6:39 PM To: Discussion of IronPython Subject: RE: [IronPython] Generics support in IronPython So that shows consumption -- is creation supported? Very cool ________________________________________ From: [EMAIL PROTECTED] on behalf of Jim Hugunin Sent: Fri 4/1/2005 5:17 PM To: Martin Smith; users-ironpython.com@lists.ironpython.com Subject: RE: [IronPython] Generics support in IronPython Martin Smith wrote: > Will IronPython support generics? Here's the short answer to your question: >>> from System.Collections.Generic import * >>> l = List[str]() >>> l.Add('hi') >>> list(l) ['hi'] >>> l.Add(42) System.Exception: bad args to this method <method# Add on <snip> _______________________________________________ users-ironpython.com mailing list users-ironpython.com@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com