Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom display formatting #55

Merged
merged 3 commits into from
Mar 17, 2021
Merged

Custom display formatting #55

merged 3 commits into from
Mar 17, 2021

Conversation

irh
Copy link
Contributor

@irh irh commented Mar 17, 2021

This PR adds the ability for a map to have custom formatting when using string formatting or debug expressions.

e.g.

foo = |x|
  x: x
  @display: |self| "Foo ({})".format self.x
assert_eq ("{}".format foo 1), "Foo (1)"

See #54 for some background discussion.

@irh irh merged commit 6f67822 into main Mar 17, 2021
@irh irh deleted the override-display-formatting branch March 17, 2021 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant