mirror of
https://github.com/python/cpython.git
synced 2025-09-12 11:46:52 +00:00
Patch# 1258 by Christian Heimes: kill basestring.
I like this because it makes the code shorter! :-)
This commit is contained in:
parent
60d241f135
commit
3172c5d263
77 changed files with 171 additions and 217 deletions
|
@ -155,7 +155,7 @@ class Wave_read:
|
|||
|
||||
def __init__(self, f):
|
||||
self._i_opened_the_file = None
|
||||
if isinstance(f, basestring):
|
||||
if isinstance(f, str):
|
||||
f = __builtin__.open(f, 'rb')
|
||||
self._i_opened_the_file = f
|
||||
# else, assume it is an open file object already
|
||||
|
@ -299,7 +299,7 @@ class Wave_write:
|
|||
|
||||
def __init__(self, f):
|
||||
self._i_opened_the_file = None
|
||||
if isinstance(f, basestring):
|
||||
if isinstance(f, str):
|
||||
f = __builtin__.open(f, 'wb')
|
||||
self._i_opened_the_file = f
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue