Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Incorrect return value from trits_from_int(0) #49

Closed
todofixthis opened this issue May 17, 2017 · 2 comments
Closed

Incorrect return value from trits_from_int(0) #49

todofixthis opened this issue May 17, 2017 · 2 comments
Labels

Comments

@todofixthis
Copy link
Contributor

trits = iota.trits_from_int(0)
print trits
> []

normal print:

trits = iota.trits_from_int(1)
print trits
> [1]

So I would expect:

trits = iota.trits_from_int(0)
print trits
> [0]
@todofixthis
Copy link
Contributor Author

There's a lot of existing functionality that relies on trits_from_int(0) returning an empty list; this will not be a trivial change.

I'll look into this a bit, see if that functionality can be modified to expect [0] instead, or at worst we could add an argument to the function that determines how to handle 0.

@todofixthis
Copy link
Contributor Author

Scheduled for release: 2.0.1

marko-k0 pushed a commit to marko-k0/iota.lib.py that referenced this issue Jul 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant