ethereum / hexbytes

Python `bytes` subclass that decodes hex, with a readable console output
MIT License
27 stars 19 forks source link

add to_0x_hex method to easily create 0x-prefixed strings #43

Closed pacrob closed 5 months ago

pacrob commented 5 months ago

What was wrong?

In PR #38, I changed the function of the .hex() method to drop the 0x-prefix to match the parent bytes class. But it turns out some other libs depend on there being a quick method to render an 0x-prefixed string.

How was it fixed?

Added the to_0x_hex() method to provide the same functionality .hex() used to have, but more explicitly.

Todo:

Cute Animal Picture

image