Skip to content

Conversation

@yabirgb
Copy link

@yabirgb yabirgb commented Aug 16, 2025

is_list and is_tuple are trivial functions that are not even used in the eth_utils code like in

typing = tuple if isinstance(aligned_arg, tuple) else type(aligned_arg)

What was wrong?

I was reading the code to know how this library worked since I use it everyday and while reading it saw this two functions that are trivial and aren't being used.

Also would want to ask about is_bool and is_int. Both are trivial and saw that they are there since inception but I don't know if there is a reason. Every function call in python carries a cost and removing them would be great

How was it fixed?

Todo:

  • Clean up commit history
  • Add or update documentation related to these changes
  • Add entry to the release notes

Cute Animal Picture

2D75EFB7-8ACF-4407-AA78-3255FC8BBACB_1_105_c

``is_list`` and ``is_tuple`` are trivial functions that are not even
used in the eth_utils code like in https://github.com/ethereum/eth-utils/blob/cdede3000287e164df197286bf3a58552cb820d4/eth_utils/abi.py#L84
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.

1 participant