use python hash+eq.
[sympyx.git] / t.py
blob2ecc628bcf998cbb2b01633c7e86028d7d749fb1
1 #! /usr/bin/env python
3 from csympy import int_hash, str_hash, HashTable, Table
5 print int_hash(5)
6 print int_hash(6)
7 print int_hash(0)
8 print int_hash(1)
9 print int_hash(-1)
11 print
13 print str_hash("ano")
14 print str_hash("ne")
15 print str_hash("n")
17 print "hash"
18 h = HashTable()
19 h.insert(1, 2)
20 h.insert(3, 5)
21 h.insert(2, "ano")
22 print h.list()
24 print "hash"
25 h = HashTable()
26 h.insert(3, 5)
27 h.insert(2, "ano")
28 h.insert(1, 2)
29 print h.list()