首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > 间隙缓冲的Python扩展类

间隙缓冲的Python扩展类

  • 资源大小:201.13 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: python 扩展 缓冲

资 源 简 介

Gap buffers are efficient mutable sequences. They are most often used to store text in text editors. They utilize locality of modification to avoid copying large amounts of data and allocate extra elements to avoid memory allocation dominating performance. The extra allocated items provide a movable gap between the two parts that contain data. Insertions and deletions occur at the gap. For a description of gap buffers see Data Structures in a Bit-Mapped Text Editor, Wilfred J. Hanson, Byte January 1987 The item type for the gap buffer may be character, Unicode character, or integer and is determined from the type of the constructor argument with a list interpreted as integer: >>> from gapbuffer import GapBuffer>>> print GapBuffer("The life of Brian")The life of Brian>>> print GapBuffer(u"Mr Creosote")Mr Creosote>>> print GapBuffer([1,2,3])GapBuffer("i") [1, 2, 3]

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
  • 猕猴桃 4小时前 成为了本站会员

  • 11 7小时前 成为了本站会员

  • 开心快活人 10小时前 成为了本站会员

  • 晋财 11小时前 成为了本站会员

  • WYG 1天前 成为了本站会员

  • Shine 1天前 成为了本站会员

  • 柳贻 1天前 成为了本站会员

  • hallelujah_HL 1天前 成为了本站会员

  • 焦昱贺 1天前 成为了本站会员

  • Rubin 1天前 成为了本站会员

0.167563s