File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ def initfp(self, file):
155155
156156 def __init__ (self , f ):
157157 self ._i_opened_the_file = None
158- if type ( f ) == type ( '' ):
158+ if isinstance ( f , basestring ):
159159 f = __builtin__ .open (f , 'rb' )
160160 self ._i_opened_the_file = f
161161 # else, assume it is an open file object already
@@ -294,7 +294,7 @@ class Wave_write:
294294
295295 def __init__ (self , f ):
296296 self ._i_opened_the_file = None
297- if type ( f ) == type ( '' ):
297+ if isinstance ( f , basestring ):
298298 f = __builtin__ .open (f , 'wb' )
299299 self ._i_opened_the_file = f
300300 self .initfp (f )
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ Extension modules
4646Library
4747-------
4848
49+ - Bug #1001053. wave.open() now accepts unicode filenames.
50+
4951- gzip.GzipFile has a new fileno() method, to retrieve the handle of the
5052 underlying file object (provided it has a fileno() method). This is
5153 needed if you want to use os.fsync() on a GzipFile.
You can’t perform that action at this time.
0 commit comments