ninia / jep

Embed Python in Java
Other
1.3k stars 147 forks source link

Enable isinstance to work with PyJClass. #440

Closed bsteffensmeier closed 1 year ago

bsteffensmeier commented 1 year ago

This fixes #438

I'm not sure if this will go in 4.1.1 or 4.2, since we haven't created a dev_4.2 branch yet I am currently targeting dev_4.1 but I may wait to merge this until we decide on a release plan.

ctrueden commented 1 year ago

This is great. To work around this limitation with the currently released version of Jep, I was doing isinstance(obj, jtype.__pytype__); it'll be great to be able to use isinstance(obj, jtype) directly instead.

bsteffensmeier commented 1 year ago

This will be included in the 4.1.1 release which I am planning to put out around the end of December.

ndjensen commented 1 year ago

I forgot to mention, I think you should add an entry in the 4.1 release notes that points out isinstance now works as one might expect.