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