[Ironpython-users] issubclass throws TypeErrorException

Jeff Hardy jdhardy at gmail.com
Sun Sep 27 19:56:11 CEST 2015


I'm thinking this might be a bug, where IronPython is getting confused by
the generic and non-generic versions of the class. Can you open an issue on
https://github.com/IronLanguages/main/issues?

- Jeff

On Fri, Sep 25, 2015 at 7:08 AM, Pilger Jan <J.Pilger at steinbichler.de>
wrote:

> Hi IronPython user message board,
>
>
>
> I have defined three classes in a C# project:
>
>
>
> public class BaseClass
>
> {
>
> }
>
>
>
> public class SubClass : BaseClass
>
> {
>
> }
>
>
>
> public class SubClass<T> : BaseClass
>
> {
>
> }
>
>
>
> The following IronPython code throws a TypeErrorException (IronPython 2.7):
>
>
>
> issubclass(SubClass, BaseClass)
>
>
>
> Exception-Message: issubclass() arg 1 must be a class
>
>
>
> Everything works fine when I just remove the generic class or move it to
> another namespace.
>
>
>
> Why? What can I do to make this work?
>
>
>
> Regards
>
>   -- Jan
>
>
>
> _____________________________________________________
>
>
>
> i.A. Jan Pilger
>
> - Development Software -
>
> _____________________________________________________
>
>
>
> extension:
>
> +49 8035 8704-543
>
> phone:
>
> +49 8035 8704-0
>
> fax:
>
> +49 8035 1010
>
> e-mail:
>
> j.pilger at steinbichler.de
>
> web:
>
> www.steinbichler.de
>
>
>
> [image: logo] <http://www.steinbichler.de/>
>
> Steinbichler Optotechnik GmbH
> Georg-Wiesböck-Ring 12, 83115 Neubeuern - Germany
>
> CEO: Dr. Marcus Steinbichler
> HRB 4836 Traunstein
> _____________________________________________________
>
> [image: Facebook] <http://www.facebook.com/steinbichleroptotechnik>[image:
> LinkedIn] <http://www.linkedin.com/company/steinbichler-optotechnik-gmbh>[image:
> Google+] <http://plus.google.com/102565731328169451720/posts>[image:
> Twitter] <http://twitter.com/steinbichler_>[image: Xing]
> <http://www.xing.com/companies/steinbichleroptotechnikgmbh>[image:
> YouTube] <http://www.youtube.com/user/steinbichler100>
>
> _______________________________________________
> Ironpython-users mailing list
> Ironpython-users at python.org
> https://mail.python.org/mailman/listinfo/ironpython-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150927/7e4f906a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.gif
Type: image/gif
Size: 1028 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150927/7e4f906a/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.gif
Type: image/gif
Size: 1139 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150927/7e4f906a/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.gif
Type: image/gif
Size: 1156 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150927/7e4f906a/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.gif
Type: image/gif
Size: 617 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150927/7e4f906a/attachment-0003.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.gif
Type: image/gif
Size: 1172 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150927/7e4f906a/attachment-0004.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 1099 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150927/7e4f906a/attachment-0005.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 4008 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150927/7e4f906a/attachment.jpg>


More information about the Ironpython-users mailing list