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):
795795 def test_imported_load_method (self ):
796796 sources = [
797797 """\
798- import ast
798+ import os
799799 def foo():
800- return ast.Name('abydos' )
800+ return os.uname( )
801801 """ ,
802802 """\
803- import ast as python_ast
803+ import os as operating_system
804804 def foo():
805- return python_ast.Name('chulak' )
805+ return operating_system.uname( )
806806 """ ,
807807 """\
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 )
811811 """ ,
812812 """\
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 )
816816 """
817817 ]
818818 for source in sources :
Original file line number Diff line number Diff line change 11Directly imported objects and modules (through import and from import
22statements) don't generate ``LOAD_METHOD ``/``CALL_METHOD `` for directly
33accessed 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