MCPcopy Create free account
hub / github.com/ipython/ipython / get_last_session_id

Method get_last_session_id

IPython/core/history.py:334–341  ·  view source on GitHub ↗

Get the last session ID currently in the database. Within IPython, this should be the same as the value stored in :attr:`HistoryManager.session_number`.

(self)

Source from the content-addressed store, hash-verified

332
333 @catch_corrupt_db
334 def get_last_session_id(self):
335 """Get the last session ID currently in the database.
336
337 Within IPython, this should be the same as the value stored in
338 :attr:`HistoryManager.session_number`.
339 """
340 for record in self.get_tail(n=1, include_latest=True):
341 return record[0]
342
343 @catch_corrupt_db
344 def get_tail(self, n=10, raw=True, output=False, include_latest=False):

Callers

nothing calls this directly

Calls 1

get_tailMethod · 0.95

Tested by

no test coverage detected