Skip to content

[query] frozenlist.__repr__ should be eval-able #13422

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

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

danking
Copy link
Contributor

@danking danking commented Aug 11, 2023

CHANGELOG: Hail frozenlist now has an eval-able repr.

hailtop.hail_frozenlist.frozenlist previously inherited the repr of the frozenlist library:

> frozenlist([1, 2, 3])
<FrozenList(frozen=True, [1, 2, 3])>

With this change, I both use the fact that frozen=True for Hail frozenlists and use a printed form that is actually eval-able:

> frozenlist([1, 2, 3])
frozenlist([1, 2, 3])
> eval(repr(frozenlist([1, 2, 3])))
frozenlist([1, 2, 3])

CHANGELOG: Hail `frozenlist` now has an eval-able `repr`.

`hailtop.hail_frozenlist.frozenlist` previously inherited the `repr` of the `frozenlist` library:

    > frozenlist([1, 2, 3])
    <FrozenList(frozen=True, [1, 2, 3])>

With this change, I both use the fact that `frozen=True` for Hail frozenlists and use a
printed form that is actually eval-able:

    > frozenlist([1, 2, 3])
    frozenlist([1, 2, 3])
    > eval(repr(frozenlist([1, 2, 3])))
    frozenlist([1, 2, 3])
@danking danking merged commit de7510f into hail-is:main Aug 23, 2023
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.

2 participants