mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
use isinstance
This commit is contained in:
parent
c5a11fabdb
commit
c6ad794051
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ __all__ = ["what"]
|
|||
|
||||
def what(file, h=None):
|
||||
if h is None:
|
||||
if type(file) == type(''):
|
||||
if isinstance(file, basestring):
|
||||
f = open(file, 'rb')
|
||||
h = f.read(32)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue