Skip to content

API missmatch to python lists #24

@syntonym

Description

@syntonym

LoroList and LoroMutableList do not implement the same API as python lists. For API compatibility with the other Loro implementations, it makes sense to keep the current methods, but I suggest to implement additional methods:

  • append
  • remove
  • pop(i) (currently LoroList.pop does not accept an index)
  • index
  • __iter__

There are additional list methods which could be implemented:

  • extend
  • __add__
  • sort
  • reverse

These methods all deal with multiple objects or rearrangements and could be "costly" to perform on the underlying CRDT. Maybe it makes sense to not implement these methods, to discourage costly operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions