Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The 'simple' example seemed to have every possible feature crammed in!
Aside from my conviction that the word 'simple' should really never be used in documentation (if something is simple then why are you documenting it?), my main difficulty here was trying to figure out where
async
andawait
are needed on the various statements.i.e. if I'm just queueing up commands for execution, why do I need to await them? And why do I need to await the call to
client.pipeline()
? This is all quite verbose and certainly not simple.Also I emphatically assummed that the
with
context manager would actually execute the pipeline upon exit, otherwise what is a context manager for?? (yes I've read the source and see that you can reuse a pipeline; I wouldn't have thought to do it this way but would have just created a new pipeline for a new transaction)Anyhow hopefully this smaller example is correct and will be helpful to future readers of the documentation.