MCPcopy Index your code
hub / github.com/python/cpython / getsize

Function getsize

Tools/unicode/makeunicodedata.py:1286–1294  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

1284
1285
1286def getsize(data):
1287 # return smallest possible integer size for the given array
1288 maxdata = max(data)
1289 if maxdata < 256:
1290 return 1
1291 elif maxdata < 65536:
1292 return 2
1293 else:
1294 return 4
1295
1296
1297def splitbins(t, trace=0):

Callers 2

dumpMethod · 0.70
splitbinsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…