@@ -70,7 +70,7 @@ def readPlist(pathOrFile):
7070 usually is a dictionary).
7171 """
7272 didOpen = 0
73- if isinstance (pathOrFile , ( str , str ) ):
73+ if isinstance (pathOrFile , str ):
7474 pathOrFile = open (pathOrFile )
7575 didOpen = 1
7676 p = PlistParser ()
@@ -85,7 +85,7 @@ def writePlist(rootObject, pathOrFile):
8585 file name or a (writable) file object.
8686 """
8787 didOpen = 0
88- if isinstance (pathOrFile , ( str , str ) ):
88+ if isinstance (pathOrFile , str ):
8989 pathOrFile = open (pathOrFile , "w" )
9090 didOpen = 1
9191 writer = PlistWriter (pathOrFile )
@@ -231,7 +231,7 @@ def __init__(self, file, indentLevel=0, indent="\t", writeHeader=1):
231231 DumbXMLWriter .__init__ (self , file , indentLevel , indent )
232232
233233 def writeValue (self , value ):
234- if isinstance (value , ( str , str ) ):
234+ if isinstance (value , str ):
235235 self .simpleElement ("string" , value )
236236 elif isinstance (value , bool ):
237237 # must switch for bool before int, as bool is a
@@ -270,7 +270,7 @@ def writeDict(self, d):
270270 self .beginElement ("dict" )
271271 items = sorted (d .items ())
272272 for key , value in items :
273- if not isinstance (key , ( str , str ) ):
273+ if not isinstance (key , str ):
274274 raise TypeError ("keys must be strings" )
275275 self .simpleElement ("key" , key )
276276 self .writeValue (value )
0 commit comments