VIP: import lists
Simple Summary
example:
from ethereum.ercs import ERC20, ERC4626, ERC20Detailed
Motivation
stub
Specification
stub
Backwards Compatibility
no issues
Dependencies
If this VIP depends on any other VIPs being implemented, please mention them.
References
Add any references that this VIP might reference (other VIPs/issues, links to blog posts, etc.)
Copyright
Copyright and related rights waived via CC0
I think this would be useful not only when importing interfaces but also when working with stateless modules. For instance if I'm making a module containing all the constants in the codebase it would be nice to be able to reference a single constant without having to prefix it with the name of the module first.
The only workaround for this currently is:
import constants
N_COINS: constant(uint256) = constants.N_COINS
But it's easy to see how this defeats the purpose of modules if you have a lot of constants to import
Resolved via https://github.com/vyperlang/vyper/pull/4762.