gpt4 book ai didi

python - 为什么在 Python 中 open() 优于 file()?

转载 作者:太空狗 更新时间:2023-10-29 16:56:39 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Python - When to use file vs open

来自官方python文档,

http://docs.python.org/library/functions.html#file

When opening a file, it’s preferable to use open() instead of invoking this constructor directly

但它没有给出原因。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com