-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Cloud Directory should accept None as NextToken #1421
Comments
Ideally this is where you would use a paginator to do this for you. It looks like there is no paginator for this operation at the moment but there is an open pull request for it here. |
Thanks for the pointer. Haven't used paginators - will look into it. However, for those who want to stay at slightly lower-level, couldn't this be supported? |
Just hit the same problem with https://boto3.readthedocs.io/en/latest/reference/services/s3.html#S3.Client.list_objects_v2 On an empty string: On None: |
Even setting the key prefix to None triggers an exception. |
The reason why As John mentioned, I would highly recommend using the paginator that got merged in to handle this for you. |
Java and JavaScript SDKs accept
Yeah, the paginators work nicely! But sometimes you want to do custom stuff, stay lower level, etc. |
@JordonPhillips Paginators are not provided for all services in boto, so it's not a generic solution. What is the use case for being able to tell between value not being specified and explicitly set to It is common practice in Python to use It is also very confusing that some functions allow |
Just want to express my disappointment at this decision. How can there be a difference between not passing a value and explicitly specifying |
Let's say your listing and index or something, and want to iterate the pages:
The above doesn't work as boto doesn't accept
None
as NextToken value (it nags about it not being string, iirc). So I would have to:Which is pretty annoying. Workaround is to:
Which is pretty ugly, plus you lose auto-completion (which actually doesn't exist due to #1055).
The text was updated successfully, but these errors were encountered: