Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ open
Function
open
example_code/item_010.py:180–182 ·
view source on GitHub ↗
(*args, **kwargs)
Source
from the content-addressed store, hash-verified
178
real_open = open
179
180
def
open(*args, **kwargs):
181
kwargs[
"encoding"
] =
"utf-8"
182
return
real_open(*args, **kwargs)
183
184
with
open(
"data.bin"
,
"r"
)
as
f:
185
data = f.read()
Callers
15
item_065.py
File · 0.85
item_086.py
File · 0.85
main
Function · 0.85
item_044.py
File · 0.85
run_tasks_simpler
Function · 0.85
run
Method · 0.85
write_random_data
Function · 0.85
start_write_threads
Function · 0.85
setup
Function · 0.85
confirm_merge
Function · 0.85
__init__
Method · 0.85
item_089.py
File · 0.85
Calls
no outgoing calls
Tested by
1
test_modify_file
Method · 0.68