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

Create dt_list.py #2855

Merged
merged 5 commits into from
Sep 12, 2023
Merged

Create dt_list.py #2855

merged 5 commits into from
Sep 12, 2023

Conversation

sav-norem
Copy link

@sav-norem sav-norem commented Jul 18, 2023

as part of the effort to get tabbed examples in client languages on the redis.io website, this file contains the examples for the list datatype in python with the appropriate short codes to be pulled in

add the data type list python code for tabbed examples
@sav-norem
Copy link
Author

@uglide and lists!

r.delete returns zero for an empty list and one for a non-empty - added a delete prior to ensure the delete is always empty and assertion passes
a single example doesn't render correctly if used twice on a webpage so adding a separate ltrim example
Copy link
Contributor

@uglide uglide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!
We can make this example more concise by explaining List basics around one pattern Producer/Consumer which is extensively covered in the current version of the doc here https://redis.io/docs/data-types/lists/

doctests/dt_list.py Show resolved Hide resolved
doctests/dt_list.py Show resolved Hide resolved
remove delete cleanups from ever being seen by user
@sav-norem
Copy link
Author

@uglide I believe those changes would be better addressed with an issue for the docs team to rework the structure of that content

@sav-norem sav-norem requested a review from uglide August 7, 2023 15:14
@sav-norem
Copy link
Author

@chayim if you could take a look!

@uglide uglide merged commit 4042bf8 into redis:emb-examples Sep 12, 2023
1 check passed
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.

None yet

2 participants