MCPcopy Index your code
hub / github.com/clips/pattern / __setitem__

Method __setitem__

pattern/db/__init__.py:1957–1964  ·  view source on GitHub ↗
(self, j, column)

Source from the content-addressed store, hash-verified

1955 # This way we can unlink them when they are deleted.
1956
1957 def __setitem__(self, j, column):
1958 if self._datasheet.fields is not None and j < len(self._datasheet.fields):
1959 # Preserve the column header if it exists.
1960 f = self._datasheet.fields[j]
1961 else:
1962 f = None
1963 self.pop(j)
1964 self.insert(j, column, field=f)
1965 def __getitem__(self, j):
1966 if j < 0: j = j % len(self) # DatasheetColumns[-1]
1967 if j >= len(self):

Callers

nothing calls this directly

Calls 3

popMethod · 0.95
insertMethod · 0.95
lenFunction · 0.85

Tested by

no test coverage detected