gpt4 book ai didi

Python 2.5 socket._fileobject 在Python 3.1 中是什么?

转载 作者:太空宇宙 更新时间:2023-11-03 19:39:32 25 4
gpt4 key购买 nike

我正在将一些在 Python 2.5 上运行的代码移植到 Python 3.1。几个类是 socket._fileobject 的子类:

class X(socket._fileobject):
....

Python 3.1 中是否有与 socket._fileobject 等效的函数?快速浏览源代码不会发现任何有用的东西。谢谢!

最佳答案

Python 3 在 makefile() 方法中使用 SocketIO 而不是 _fileobject,因此这可能是正确的方法。

关于Python 2.5 socket._fileobject 在Python 3.1 中是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1150653/

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