-
Notifications
You must be signed in to change notification settings - Fork 840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve PySequence objects #659
Labels
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With #530 we made most of the components expose their attributes and allow their modification. We'd like to do the same for
PySequence
objects (both forNormalizer
andPreTokenizer
sequences).In order to make these
PySequence
objects behave like a list, we'd need to implement thePySequenceProtocol
with the__len__
,__getitem__
and__setitem__
dunder methods. Unfortunately, these don't support using aPyRef
at the moment (cf PyO3/pyo3#1206), and we need it to access the content of the base class.This is necessary to allow behavior such as:
The text was updated successfully, but these errors were encountered: