File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
Misc/NEWS.d/next/Core and Builtins Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -795,24 +795,24 @@ def or_false(x):
795
795
def test_imported_load_method (self ):
796
796
sources = [
797
797
"""\
798
- import ast
798
+ import os
799
799
def foo():
800
- return ast.Name('abydos' )
800
+ return os.uname( )
801
801
""" ,
802
802
"""\
803
- import ast as python_ast
803
+ import os as operating_system
804
804
def foo():
805
- return python_ast.Name('chulak' )
805
+ return operating_system.uname( )
806
806
""" ,
807
807
"""\
808
- from concurrent import futures
809
- def foo():
810
- return futures.Executor( )
808
+ from os import path
809
+ def foo(x ):
810
+ return path.join(x )
811
811
""" ,
812
812
"""\
813
- from concurrent import futures as c_futures
814
- def foo():
815
- return c_futures.Executor( )
813
+ from os import path as os_path
814
+ def foo(x ):
815
+ return os_path.join(x )
816
816
"""
817
817
]
818
818
for source in sources :
Original file line number Diff line number Diff line change 1
1
Directly imported objects and modules (through import and from import
2
2
statements) don't generate ``LOAD_METHOD ``/``CALL_METHOD `` for directly
3
3
accessed objects on their namespace. They now use the regular
4
- ``LOAD_ATTR ``/``CALL_FUNC ``.
4
+ ``LOAD_ATTR ``/``CALL_FUNCTION ``.
You can’t perform that action at this time.
0 commit comments