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

Add __penzai_repr__ extension method and repr_lib helpers. #28

Merged
merged 1 commit into from
May 28, 2024

Conversation

copybara-service[bot]
Copy link

Add penzai_repr extension method and repr_lib helpers.

The penzai_repr method can be used to add a handler for a custom
type without modifying the global handler list. This is designed to make
it easier to extend treescope to support custom types.

Also adds a high-level helper library repr_lib to make it easier to
implement penzai_repr.

The __penzai_repr__ method can be used to add a handler for a custom
type without modifying the global handler list. This is designed to make
it easier to extend treescope to support custom types.

Also adds a high-level helper library `repr_lib` to make it easier to
implement __penzai_repr__.

PiperOrigin-RevId: 637942807
@copybara-service copybara-service bot merged commit 50b2762 into main May 28, 2024
@copybara-service copybara-service bot deleted the test_637319545 branch May 28, 2024 17:21
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