python Programming Glossary: str_int
What is the best way to get a semi long unique id (non sequential) key for Database objects http://stackoverflow.com/questions/9877524/what-is-the-best-way-to-get-a-semi-long-unique-id-non-sequential-key-for-datab val len keyspace out keyspace digit return out 1 def str_int val keyspace Turn a string into a positive integer. out 0 for.. must occur only once def test v s int_str v keyspace w str_int s keyspace print OK r int_str d r str_int r d v w v s s w test.. v keyspace w str_int s keyspace print OK r int_str d r str_int r d v w v s s w test 1064463423090 test 4319193500 test 495689346389..
|