0

If I have an attribute self.internal/freezer in a class, and I raise an error via (raise (AttributeError f"Sorry! '{attr}' doesn't exist as an attribute!")), how can I get the attribute name to render as internal/freezer instead of hyx_internalXsolidusXfreezer? For example, I already tried (hy.eval attr) with the f-string, but it still came out mangled.

ShadowRylander
  • 361
  • 2
  • 8

1 Answers1

2

Thanks to @Kodiologist in the comments linking the mangling section in hylang's syntax documentation; unamgling can be achieved via the aptly named hy.unmangle function, documented here as well.

ShadowRylander
  • 361
  • 2
  • 8