This is a development version (9.18.0.dev) and may be unstable.Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython 9.18.0.dev / IPython / core / completer / Completer / _trim_expr

function

IPython.core.completer:Completer._trim_expr

source: /IPython/core/completer.py:1361

Signature

def _trim_expr(self, code: str) → str

Summary

Trim the code until it is a valid expression and not a tuple;

Extended Summary

return the trimmed expression for guarded_eval.

Aliases

  • IPython.core.completer.Completer._trim_expr