Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ is_file
Function
is_file
recipes/Python/576445_ElementTree_Wrapper/recipe-576445.py:8–9 ·
view source on GitHub ↗
(ob)
Source
from the content-addressed store, hash-verified
6
#3.x
7
import
io
8
def
is_file(ob):
9
return
isinstance(ob, io.IOBase)
10
def
is_text(ob):
11
return
type(ob) == str
12
except
:
Callers
1
__new__
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected