MCPcopy Create free account
hub / github.com/ActiveState/code / definition

Function definition

recipes/Python/496857_zcryptpy/recipe-496857.py:12–20  ·  view source on GitHub ↗

Returns a valid definition.

(name=None)

Source from the content-addressed store, hash-verified

10import random
11
12def definition(name=None):
13 'Returns a valid definition.'
14 random.seed(name)
15 definition, list_one, list_two = str(), range(256), range(256)
16 for index in range(256):
17 index_one, index_two = random.randrange(256 - index), random.randrange(256 - index)
18 definition += chr(list_one[index_one]) + chr(list_two[index_two])
19 del list_one[index_one], list_two[index_two]
20 return definition
21
22
23def key(definition, select):

Callers

nothing calls this directly

Calls 3

strFunction · 0.85
rangeFunction · 0.85
seedMethod · 0.45

Tested by

no test coverage detected