add std_map example

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8291 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-08 07:00:51 +00:00
commit 532fa355ea
6 changed files with 117 additions and 0 deletions

View file

@ -0,0 +1,36 @@
# file: runme.py
import example
dmap = {}
dmap["hello"] = 1.0
dmap["hi"] = 2.0
print dmap.items()
print dmap.keys()
print dmap.values()
print dmap
print example.halfd(dmap)
dmap = example.DoubleMap()
dmap["hello"] = 1.0
dmap["hi"] = 2.0
print dmap.items()
print dmap.keys()
print dmap.values()
hmap = example.halfd(dmap)
print hmap.keys()
print hmap.values()
dmap = {}
dmap["hello"] = 2
dmap["hi"] = 4
hmap = example.halfi(dmap)
print hmap
print hmap.keys()
print hmap.values()