Skip to content

Commit

Permalink
Rename encoded_string to demarcate internal usage (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldiamant authored Jul 22, 2022
1 parent a27b31b commit f2f1563
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyteal/ast/abi/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from pyteal.errors import TealInputError


def encoded_string(s: Expr):
def _encoded_string(s: Expr):
return Concat(Suffix(Itob(Len(s)), Int(6)), s)


Expand Down Expand Up @@ -102,9 +102,9 @@ def set(
f"Got {value} with type spec {value.type_spec()}, expected {StringTypeSpec}"
)
case str() | bytes():
return self.stored_value.store(encoded_string(Bytes(value)))
return self.stored_value.store(_encoded_string(Bytes(value)))
case Expr():
return self.stored_value.store(encoded_string(value))
return self.stored_value.store(_encoded_string(value))
case CollectionSequence():
return super().set(cast(Sequence[Byte], value))

Expand Down

0 comments on commit f2f1563

Please sign in to comment.