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

Support nested tuple unpacking in for loops #368

Closed
wants to merge 3 commits into from

Conversation

mtc-mlx
Copy link
Contributor

@mtc-mlx mtc-mlx commented Nov 10, 2022

For example:

for (key1, val1), (key2, val2) in itertools.pairwise(dict.items()):
    ...

This is really just "kicking the can down the road" so to speak, because it doesn't allow an infinite number of layers of tuples, but it helps somewhat.

@zzzeek
Copy link
Member

zzzeek commented Nov 10, 2022

how many layers does it support?

@mtc-mlx
Copy link
Contributor Author

mtc-mlx commented Nov 10, 2022

Only two layers, like in the example I gave. I see I forgot to run flake on the test folder; oops.

Copy link
Collaborator

@sqla-tester sqla-tester left a comment

Choose a reason for hiding this comment

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

OK, this is sqla-tester setting up my work on behalf of zzzeek to try to get revision 9f953ac of this pull request into gerrit so we can run tests and reviews and stuff

Copy link
Collaborator

@sqla-tester sqla-tester left a comment

Choose a reason for hiding this comment

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

OK, this is sqla-tester setting up my work on behalf of zzzeek to try to get revision 9f953ac of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester
Copy link
Collaborator

New Gerrit review created for change 9f953ac: https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/4187

@zzzeek
Copy link
Member

zzzeek commented Nov 10, 2022

looks like it needs pre-commit run, that will fix up the pep8 problems.

also we need a changelog file in the doc/build/unreleased/ folder. See 9257602 for an example of this.

@mtc-mlx
Copy link
Contributor Author

mtc-mlx commented Nov 10, 2022

Thanks for the guidance :)

Copy link
Collaborator

@sqla-tester sqla-tester left a comment

Choose a reason for hiding this comment

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

OK, this is sqla-tester setting up my work on behalf of zzzeek to try to get revision 3f15a87 of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester
Copy link
Collaborator

Patchset 3f15a87 added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/4187

@sqla-tester
Copy link
Collaborator

mike bayer (zzzeek) wrote:

thanks!

View this in Gerrit at https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/4187

@sqla-tester
Copy link
Collaborator

Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/4187 has been merged. Congratulations! :)

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

4 participants