mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
make __import__ 4-args
This commit is contained in:
parent
194e57caa6
commit
4f4c9b42ba
2 changed files with 2 additions and 2 deletions
|
@ -135,7 +135,7 @@ The following function emulates the default import statement:
|
|||
import imp
|
||||
from sys import modules
|
||||
|
||||
def __import__(name):
|
||||
def __import__(name, globals=None, locals=None, fromlist=None):
|
||||
# Fast path: let's see if it's already in sys.modules.
|
||||
# Two speed optimizations are worth mentioning:
|
||||
# - We use 'modules' instead of 'sys.modules'; this saves a
|
||||
|
|
|
@ -135,7 +135,7 @@ The following function emulates the default import statement:
|
|||
import imp
|
||||
from sys import modules
|
||||
|
||||
def __import__(name):
|
||||
def __import__(name, globals=None, locals=None, fromlist=None):
|
||||
# Fast path: let's see if it's already in sys.modules.
|
||||
# Two speed optimizations are worth mentioning:
|
||||
# - We use 'modules' instead of 'sys.modules'; this saves a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue