Skip to content

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