Skip to content

Match with symbols #2366

Answered by Kodiologist
jakesnell asked this question in Q&A
Dec 2, 2022 · 2 comments · 5 replies

You must be logged in to vote

Python limits what is allowed as a pattern in a match statement, and Hy doesn't try to extend this. In particular, Hy won't try to expand macro calls in a pattern, and 'rock is just syntactic sugar for calling the macro quote. I don't know what your real situation is, but I bet you'd be happier with Hyrule's case or branch.

Replies: 2 comments 5 replies

You must be logged in to vote
1 reply
@jakesnell

Answer selected by jakesnell

You must be logged in to vote
4 replies
@Kodiologist

@Kodiologist

@wrobell

@wrobell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants