Python3でリングバッファを作る

Python3でリングバッファっぽく使える配列クラスを作ってみました。
class RingBuffer:
    def __init__(self, size):
        self.buffer = [None for i in range(0, size)]
        self.top = 0
        self.bottom = 0
        self.size = size

    def __len__(self):
        return self.bottom - self.top

    def add(self, value):
        self.buffer[self.bottom] = value
        self.bottom = (self.bottom + 1) % len(self.buffer)

    def get(self, index=None):
        if index is not None:
            return self.buffer[index]

        value = self.buffer[self.top]
        self.top =(self.top + 1) % len(self.buffer)
        return value

if __name__ == "__main__":
    rbuf = RingBuffer(5)

    rbuf.add('hoge')
    rbuf.add('fuga')
    rbuf.add('piyo')
    rbuf.add(1)
    rbuf.add(2)
    rbuf.add(3)
    
    print('len:' + str(len(rbuf)))
    print('size:' + str(rbuf.size))
    print('top:' + str(rbuf.top))
    print('bottom:' + str(rbuf.bottom))
    print('-----------')
    print(rbuf.get())
    print(rbuf.get())
    print(rbuf.get())
    print(rbuf.get())
    print(rbuf.get())
    print(rbuf.get())
    print(rbuf.get(rbuf.bottom))
>python RingBuffer.py
len:1
size:5
top:0
bottom:1
-----------
3
fuga
piyo
1
2
3
fuga