Some helpers without having a specific module
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ringbuffer.py 452B

1234567891011121314
  1. import sys
  2. sys.path.append('../..')
  3. import helpers
  4. rb = helpers.ringbuffer(length=5)
  5. print(rb, '\n--------------------------------------------------------------')
  6. rb.append(0)
  7. print(rb, '\n--------------------------------------------------------------')
  8. rb.extend((1,2,3,4,5,6))
  9. print(rb, '\n--------------------------------------------------------------')
  10. rb.append(17)
  11. print(rb, '\n--------------------------------------------------------------')