python中的缓冲区意味着什么

在struct的python文档中,使用了单词buffer而没有解释:

http://docs.python.org/library/struct.html

struct.unpack_from(fmt,buffer[,offset=0])

Unpack the buffer
according to the given format. The
result is a tuple even if it contains
exactly one item. The buffer must
contain at least the amount of data
required by the format
(len(buffer[offset:]) must be at least
calcsize(fmt)).

这里的缓冲区是什么意思.字符串是缓冲区还是文件描述符? “缓冲”必须有哪些方法

最佳答案
它是一个内存缓冲区:在Python 2中,一个字符串(str),在Python 3中,一个二进制字符串(字节),或者一个buffer构造的对象.

相关文章

我最近重新拾起了计算机视觉,借助Python的opencv还有face_r...
说到Pooling,相信学习过CNN的朋友们都不会感到陌生。Poolin...
记得大一学Python的时候,有一个题目是判断一个数是否是复数...
文章目录 3 直方图Histogramplot1. 基本直方图的绘制 Basic ...
文章目录 5 小提琴图Violinplot1. 基础小提琴图绘制 Basic v...
文章目录 4 核密度图Densityplot1. 基础核密度图绘制 Basic ...