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

ABI/codecs implementation (part 1) #47

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Conversation

andreibancioiu
Copy link
Contributor

@andreibancioiu andreibancioiu commented Jun 5, 2024

@andreibancioiu andreibancioiu self-assigned this Jun 5, 2024
@andreibancioiu andreibancioiu marked this pull request as ready for review June 5, 2024 15:09
@andreibancioiu andreibancioiu changed the title ABI/codecs implementation (part 1). ABI/codecs implementation (part 1) Jun 5, 2024
def _do_serialize(self, parts_holder: PartsHolder, input_values: Sequence[Any]):
for i, value in enumerate(input_values):
if value is None:
raise ValueError("cannot serialize nil value")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nil seems very Golang-ish

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #49.

def _do_deserialize(self, parts_holder: PartsHolder, output_values: Sequence[Any]):
for i, value in enumerate(output_values):
if value is None:
raise ValueError("cannot deserialize into nil value")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comm as above regarding nil

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #49.

https://docs.multiversx.com/developers/data/serialization-overview
"""

def __init__(self, parts_separator: str):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe parts_separator can be @ by default? But i also understand this respects the Go implementation. Not a big deal anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@axenteoctavian axenteoctavian self-requested a review June 6, 2024 08:47
@andreibancioiu andreibancioiu merged commit 67f2473 into feat/codecs Jun 6, 2024
1 of 5 checks passed
@andreibancioiu andreibancioiu deleted the codecs-june-1 branch June 6, 2024 08:57
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.

3 participants