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

Method _make_blanks

Lib/idlelib/editor.py:1512–1517  ·  view source on GitHub ↗
(self, n)

Source from the content-addressed store, hash-verified

1510 # Make string that displays as n leading blanks.
1511
1512 def _make_blanks(self, n):
1513 if self.usetabs:
1514 ntabs, nspaces = divmod(n, self.tabwidth)
1515 return '\t' * ntabs + ' ' * nspaces
1516 else:
1517 return ' ' * n
1518
1519 # Delete from beginning of line to insert point, then reinsert
1520 # column logical (meaning use tabs if appropriate) spaces.

Callers 3

reindent_toMethod · 0.95
indent_region_eventMethod · 0.80
dedent_region_eventMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected