Skip to content

Dropping branches before using a transformer #1223

Answered by taylorh140
taylorh140 asked this question in Q&A
Discussion options

You must be logged in to vote

I think to answer my own question the solution was not do drop a branch before using a transformer. but to use another transformer to drop the branch for me.

class DropCast(Transformer):
def exp_cast(self,args) return args[1] # keep the thing you want

This transformer can do the thing.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by taylorh140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant