Skip to content

Commit

Permalink
Remove py3 indirection for _to_binary
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Sep 21, 2021
1 parent 99a52d4 commit 114f80b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ulid2.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ class InvalidULID(ValueError):


def _to_binary(byte_list):
if py3:
return bytes(byte_list)
else:
return bytes(b''.join(chr(b) for b in byte_list))
return bytes(b''.join(chr(b) for b in byte_list))


if py3:
_to_binary = bytes

# Unrolled and optimized ULID Base32 encoding/decoding
# implementations based on NUlid:
# https://github.com/RobThree/NUlid/blob/5f2678b4d/NUlid/Ulid.cs#L159
Expand Down

0 comments on commit 114f80b

Please sign in to comment.