Skip to content
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

Add python list operations to PyList #362

Merged
merged 3 commits into from
Aug 21, 2019
Merged

Add python list operations to PyList #362

merged 3 commits into from
Aug 21, 2019

Conversation

mattcoley
Copy link
Collaborator

@mattcoley mattcoley commented Aug 21, 2019

Extended PyList to support most of the python list operations (https://docs.python.org/3/tutorial/datastructures.html).

One issue is with the remove() function which I cannot overload.

@boulter
Copy link
Contributor

boulter commented Aug 21, 2019

This seems like something that's not supported in Jinja. In python, you prepend with .insert. That would be preferable to something completely proprietary.

@mattcoley
Copy link
Collaborator Author

👍 Makes sense, let me change this.

@mattcoley mattcoley changed the title Add prepend operation to list Add python list operations to PyList Aug 21, 2019
@mattcoley
Copy link
Collaborator Author

Ok @boulter I added functions to PyList to make it similar to a regular python list.

@mattcoley mattcoley merged commit e867e3e into master Aug 21, 2019
@mattcoley mattcoley deleted the prepend-list branch August 21, 2019 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants