Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
37420deb
Commit
37420deb
authored
Jan 27, 2018
by
INADA Naoki
Committed by
GitHub
Jan 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-32678: inspect: Import ast lazily (GH-5344)
parent
29a7df78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Lib/inspect.py
Lib/inspect.py
+3
-1
No files found.
Lib/inspect.py
View file @
37420deb
...
@@ -32,7 +32,6 @@ __author__ = ('Ka-Ping Yee <ping@lfw.org>',
...
@@ -32,7 +32,6 @@ __author__ = ('Ka-Ping Yee <ping@lfw.org>',
'Yury Selivanov <yselivanov@sprymix.com>'
)
'Yury Selivanov <yselivanov@sprymix.com>'
)
import
abc
import
abc
import
ast
import
dis
import
dis
import
collections.abc
import
collections.abc
import
enum
import
enum
...
@@ -1940,6 +1939,9 @@ def _signature_fromstr(cls, obj, s, skip_bound_arg=True):
...
@@ -1940,6 +1939,9 @@ def _signature_fromstr(cls, obj, s, skip_bound_arg=True):
"""Private helper to parse content of '__text_signature__'
"""Private helper to parse content of '__text_signature__'
and return a Signature based on it.
and return a Signature based on it.
"""
"""
# Lazy import ast because it's relatively heavy and
# it's not used for other than this function.
import
ast
Parameter
=
cls
.
_parameter_cls
Parameter
=
cls
.
_parameter_cls
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment