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

Avoid Python U256 decoder repetition? #1555

Closed
thibault-martinez opened this issue Nov 2, 2023 · 1 comment
Closed

Avoid Python U256 decoder repetition? #1555

thibault-martinez opened this issue Nov 2, 2023 · 1 comment
Assignees
Labels
b-python Bindings - Python good-first-issue Good first issue

Comments

@thibault-martinez
Copy link
Member

As seen in #1552, things like

    amount: int = field(metadata=config(
        encoder=hex,
        decoder=lambda v: int(v, 16)
    ))

should probably be factored.
Maybe something like

def HexField(**args):
    return field(metadata=config(
        encoder=hex,
        decoder=lambda v: int(v, 16),
        **args,
    ))
@github-project-automation github-project-automation bot moved this to Product Backlog in iota-sdk Nov 2, 2023
@Thoralf-M Thoralf-M added the b-python Bindings - Python label Nov 2, 2023
@Thoralf-M Thoralf-M added this to the v2.0.0 milestone Nov 2, 2023
@Thoralf-M Thoralf-M added the good-first-issue Good first issue label Nov 2, 2023
@tadzik tadzik mentioned this issue Nov 2, 2023
6 tasks
@Thoralf-M Thoralf-M moved this from Product Backlog to In Review in iota-sdk Nov 2, 2023
@thibault-martinez
Copy link
Member Author

Closed by #1557

@github-project-automation github-project-automation bot moved this from In Review to Done in iota-sdk Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b-python Bindings - Python good-first-issue Good first issue
Projects
Status: Done
Development

No branches or pull requests

3 participants