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

Method store

Lib/idlelib/history.py:90–101  ·  view source on GitHub ↗

Store Shell input statement into history list.

(self, source)

Source from the content-addressed store, hash-verified

88 self.prefix = prefix
89
90 def store(self, source):
91 "Store Shell input statement into history list."
92 source = source.strip()
93 if len(source) > 2:
94 # avoid duplicates
95 try:
96 self.history.remove(source)
97 except ValueError:
98 pass
99 self.history.append(source)
100 self.pointer = None
101 self.prefix = None
102
103
104if __name__ == "__main__":

Callers 4

resetoutputMethod · 0.45
test_store_shortMethod · 0.45
test_store_dupMethod · 0.45
test_store_resetMethod · 0.45

Calls 3

stripMethod · 0.45
removeMethod · 0.45
appendMethod · 0.45

Tested by 3

test_store_shortMethod · 0.36
test_store_dupMethod · 0.36
test_store_resetMethod · 0.36