diff --git a/jedi/__init__.py b/jedi/__init__.py index c94d9cab..db5869ef 100644 --- a/jedi/__init__.py +++ b/jedi/__init__.py @@ -8,9 +8,9 @@ example for the autocompletion feature: >>> import jedi >>> source = '''import json; json.l''' ->>> script = jedi.Script(source, 1, 19, '') +>>> script = jedi.Script(source, 1, 19, 'example.py') >>> script - + >>> completions = script.complete() >>> completions [, ] diff --git a/jedi/api.py b/jedi/api.py index 09eeea2a..6fb98169 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -62,6 +62,9 @@ class Script(object): self.source_path = source_path debug.speed('init') + def __repr__(self): + return '<%s: %s>' % (self.__class__.__name__, repr(self.source_path)) + @property def _parser(self): """ lazy parser."""