Function parameters syntax edge case #2607
-
Not sure if this is a bug or not, perhaps I am being stupid but from the docs I would expect the following to work: => (defn f [a #* args * [b None]] )
Traceback (most recent call last):
File "stdin-c8cbf6a41b297a4cc4cd14f6d7b68de32e687b85", line 1
(defn f [a #* args * [b None]] )
^
hy.errors.HySyntaxError: parse error for pattern macro 'defn': got unexpected end of macro call, expected: end of macro call |
Beta Was this translation helpful? Give feedback.
Answered by
Kodiologist
Sep 20, 2024
Replies: 1 comment 2 replies
-
Can you be more specific about how the manual led you to believe this? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
atisharma
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you be more specific about how the manual led you to believe this?
*
after*args
isn't allowed in Python, either, and it's redundant.