<div dir="ltr">Hi,<br><br>looks like this just hasn't been implemented yet. I don't think it's specific to the 3.4 build.<div><br></div><div>Could you create a github issue with your example if you get a chance? (<a href="https://github.com/pythonnet/pythonnet/">https://github.com/pythonnet/pythonnet/</a>)</div><div><br></div><div>If you want to have a go at implementing it yourself, take a look at the classes DelegateObject (delegateobject.cs) and GenericType (generictype.cs), and the method ClassManager.CreateClass in classmanager.cs.</div><div><br></div><div>cheers,</div><div>Tony</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 1, 2015 at 7:35 AM Tamas Ruszkai <<a href="mailto:ruszkait@gmail.com">ruszkait@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I have installed CPython 3.4 64bit and pythonnet-2.1.0.dev1-cp34-none-win_amd64.whl<br></div><div><br></div><div>I have tried to use the generic action delegate, but failed.</div><div><br></div><div><div>Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32</div><div>Type "help", "copyright", "credits" or "license" for more information.</div><div>>>> import clr</div><div>>>> clr.AddReference("System")</div><div><System.Reflection.RuntimeAssembly object at 0x0000000002DFAC18></div><div>>>> import System</div><div>>>> def hello(number):</div><div>...           print(number)</div><div>...</div><div>>>> deleg = System.Action[int](hello)<br></div><div>Traceback (most recent call last):</div><div>  File "<stdin>", line 1, in <module></div><div>TypeError: unsubscriptable object</div><div>>>></div></div><div><br></div><div>However when I want to instantiate a genrics dictionary then it works.</div><div><br></div><div><div>>>> clr.AddReference("System.Collections")</div><div><System.Reflection.RuntimeAssembly object at 0x0000000002397550></div><div>>>> import System.Collections.Generic</div><div>>>> dict = System.Collections.Generic.Dictionary[int,str]()<br></div><div>>>> dict[5]="asd"</div><div>>>> print(dict[5])</div><div>asd</div></div></div>
_________________________________________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org" target="_blank">PythonDotNet@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pythondotnet" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/pythondotnet</a></blockquote></div>