mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
#1535: rename __builtin__ module to builtins.
This commit is contained in:
parent
87f9c53937
commit
1a3284ed69
70 changed files with 246 additions and 247 deletions
|
|
@ -29,7 +29,7 @@ modfile = normcase(modfile)
|
|||
def revise(filename, *args):
|
||||
return (normcase(filename),) + args
|
||||
|
||||
import __builtin__
|
||||
import builtins
|
||||
|
||||
try:
|
||||
1/0
|
||||
|
|
@ -197,7 +197,7 @@ class TestRetrievingSourceCode(GetSourceBase):
|
|||
# Do it again (check the caching isn't broken)
|
||||
self.assertEqual(inspect.getmodule(mod.StupidGit.abuse), mod)
|
||||
# Check a builtin
|
||||
self.assertEqual(inspect.getmodule(str), sys.modules["__builtin__"])
|
||||
self.assertEqual(inspect.getmodule(str), sys.modules["builtins"])
|
||||
# Check filename override
|
||||
self.assertEqual(inspect.getmodule(None, modfile), mod)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue