Skip to content

Noob question: importing macros #2120

Answered by sneilan
sneilan asked this question in Q&A
Jul 14, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

I just figured it out!

> (require hy.contrib.slicing [ncut])
=> ncut
Traceback (most recent call last):
  File "stdin-cd1363eafa6303b9444a75839546c1dc3d87d9a5", line 1, in <module>
    ncut
NameError: name 'ncut' is not defined
=> (ncut)
Traceback (most recent call last):
  File "stdin-7a275e3177d0e0fe8f6f46fd448f506d80969b9c", line 1, in <module>
    (ncut)
hy.errors.HyMacroExpansionError:
  File "<stdin>", line 1
    (ncut)
    ^----^
expanding macro ncut
  TypeError: ncut() missing 2 required positional arguments: 'seq' and 'key1'

It imports! :)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@scauligi
Comment options

@sneilan
Comment options

Answer selected by allison-casey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants