MCPcopy Create free account
hub / github.com/ActiveState/code / recipe-121965.py

File recipe-121965.py

recipes/Python/121965_base64_encoding__oneliner/recipe-121965.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#generate Base64 Alphabet in one line
2b64list = reduce(lambda v,a:v+[chr(ord(a[0])+i) for i in range(a[1])],[('A',26),('a',26),('0',10)],[])+['+','/','=']
3
4#now convert each 24 bit field into 4 pieces

Callers

nothing calls this directly

Calls 7

rangeFunction · 0.85
applyFunction · 0.50
encodeFunction · 0.50
joinMethod · 0.45
extendMethod · 0.45
popMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected