Skip to content

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

Merged
danking merged 1 commit into
hail-is:mainfrom
danking:frozenlist-repr
Aug 23, 2023
Merged

[query] frozenlist.__repr__ should be eval-able#13422
danking merged 1 commit into
hail-is:mainfrom
danking:frozenlist-repr

Conversation

@danking

@danking danking commented Aug 11, 2023

Copy link
Copy Markdown
Contributor

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