Skip to content

Instantly share code, notes, and snippets.

@jimbaker
Created March 13, 2014 17:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jimbaker/9532639 to your computer and use it in GitHub Desktop.
Example of Java <-> Jython integration around None <-> null conversion
$ jython27
Jython 2.7b1+ (default:6e438088c0e3, Feb 10 2014, 11:00:25)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_21
Type "help", "copyright", "credits" or "license" for more information.
>>> from java.util import HashMap
>>> x = {"a": 42, "b": None}
>>> y = HashMap(x)
>>> y
{b=null, a=42}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment