Skip to content

Add String type #93

Description

@OutSquareCapital

A sequence builtin that is lacking is a str equivalent.

Currently, working with str and pyochain is a bit awkard, as a lot of methods return "raw" list and Iterator, breaking method chains. we could also add methods from rust that are missing in python when applicable.

However, great care must be taken in the implementation: since we often work with Iterable of str, it means that overhead is even less acceptable than with Vec or Seq.

As such, the best way would surely be to directly inerhit from str, rather than going with the usual composition pattern.

However, it means that this "break" the usual way of implementing wrappers, and we can't benefit from an "easy" heritance of PyoSequence.

The latter point especially imply some work, as we must integrate the whole chain of PyoSequence in a py_abc trait.

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

    featureA new feature (not an enhancement!)

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions