mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +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
|
@ -636,13 +636,13 @@ class Option:
|
|||
else:
|
||||
# Allow type objects or builtin type conversion functions
|
||||
# (int, str, etc.) as an alternative to their names. (The
|
||||
# complicated check of __builtin__ is only necessary for
|
||||
# complicated check of builtins is only necessary for
|
||||
# Python 2.1 and earlier, and is short-circuited by the
|
||||
# first check on modern Pythons.)
|
||||
import __builtin__
|
||||
import builtins
|
||||
if ( isinstance(self.type, type) or
|
||||
(hasattr(self.type, "__name__") and
|
||||
getattr(__builtin__, self.type.__name__, None) is self.type) ):
|
||||
getattr(builtins, self.type.__name__, None) is self.type) ):
|
||||
self.type = self.type.__name__
|
||||
|
||||
if self.type == "str":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue