In Python the serialization process is called pickling, and you can pickle/ unpickle your objects to/ from a string, a file on disk, or any file-like object. 在Python中,这种序列化过程称为pickle,可以将对象pickle成字符串、磁盘上的文件或者任何类似于文件的对象,也可以将这些字符串、文件或任何类似于文件的对象unpickle成原来的对象。
Stream-like objects are file-like objects with read() and write() methods& sockets or files, for example. 类似于流的对象是一些具有read()和write()方法的类似于文件的对象&比如,socket或文件。
Feedinfo is the main function, and takes a URL and an optional output stream ( file-like object), defaulting to system output ( the console). feedinfo是主函数,负责接收URL和可选的输出流(类似文件的对象),默认输出流为系统输出(控制台)。
For example, there are many functions that operate on "file-like" objects, where file-like is defined simply by supporting a few methods like. read(),. readlines(), and maybe. seek(). 例如,有许多函数都是对“类文件”对象进行操作,其中只是通过支持类似.read()、.readlines()也许还有.seek()这样的几个方法来定义类文件。
But at the boundaries for objects that belong to custom classes it is difficult to state definitively what constitutes "dictionary-like" or "file-like" behavior. 但是,在边界对于属于自定义类的对象来说难以声明最终是什么构成了“类-dictionary”或“类-file”的行为。
Narrow flattened warm-water fishes with leathery skin and a long file-like dorsal spine. 温暖水域中窄而平的鱼,有似革的皮肤和锉刀状的长背脊骨。
As the name implies, a memory-mapped file maps a file-like construct to an address in memory. 顾名思义,一个内存映射文件将一个类似文件的结构映射到内存的地址中。
Providing direct, file-like access to storage devices is therefore the key contribution of object-based storage. 基于对象的存储的关键贡献就是提供了直接的、类似文件的存储设备访问。