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

WIP: Implicit chaining in lists: Make [x, y,...] same as [(x, y, ...)] #221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mathrick
Copy link

Fixes #220

There are currently multiple test failures because of #107. I think this demonstrates that the current handling of SKIP is not optimal, since I would definitely expect glom(target, spec) == glom(target, (spec,)).

@kurtbrose
Copy link
Collaborator

oh hey sorry for letting this get stale :-) the reason for SKIP having weird behavior is that tuple intercepts SKIP

https://github.com/mahmoud/glom/blob/master/glom/core.py#L1861-L1862

the tuple "hides" SKIP from the enclosing list

I'm surprised this doesn't cause some kind of infinite loop, since it causes _handle_tuple to defer over to Pipe, which itself calls back to _handle_tuple: https://github.com/mahmoud/glom/blob/master/glom/core.py#L1885

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.

[s1, s2, s3, ...] as spec should be equivalent to [(s1, s2, s3, ...)]
2 participants