mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Removed the new module
Removed a lot of types from the 'types' module that are available through builtins.
This commit is contained in:
parent
ceee0773d2
commit
c9543e4233
10 changed files with 18 additions and 198 deletions
|
@ -918,7 +918,7 @@ def parse(file, namespaces=True):
|
|||
else:
|
||||
builder = ExpatBuilder()
|
||||
|
||||
if isinstance(file, StringTypes):
|
||||
if isinstance(file, str):
|
||||
fp = open(file, 'rb')
|
||||
try:
|
||||
result = builder.parseFile(fp)
|
||||
|
@ -952,7 +952,7 @@ def parseFragment(file, context, namespaces=True):
|
|||
else:
|
||||
builder = FragmentBuilder(context)
|
||||
|
||||
if isinstance(file, StringTypes):
|
||||
if isinstance(file, str):
|
||||
fp = open(file, 'rb')
|
||||
try:
|
||||
result = builder.parseFile(fp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue