Skip to content

API missmatch to python lists #24

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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