Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ _length
Method
_length
Lib/test/test_tarfile.py:1915–1917 ·
view source on GitHub ↗
(self, s)
Source
from the content-addressed store, hash-verified
1913
# and Longlink extended headers (cp. bug #812325).
1914
1915
def
_length(self, s):
1916
blocks = len(s) // 512 + 1
1917
return
blocks * 512
1918
1919
def
_calc_size(self, name, link=None):
1920
# Initial tar header
Callers
1
_calc_size
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected