vyper
vyper copied to clipboard
Allow comma-separated, multi-interface imports
Simple Summary
Allow comma-separated, pythonic-style, multi-interface imports:
from vyper.interfaces import ERC20, ERC20Detailed
The Vyper compiler currently disallows this as the rule currently is that an assignment statement must have one target.
Motivation
Support pythonic-style imports. PEP 8 says the following:
Imports should usually be on separate lines:
# Correct:
import os
import sys
# Wrong:
import sys, os
It's okay to say this though:
# Correct:
from subprocess import Popen, PIPE
Specification
Allow comma-separated, pythonic-style, multi-interface imports:
from interface_path.interface_name import x, y, z
Backwards Compatibility
Not backwards-compatible syntax.
Dependencies
N/A.
References
N/A.
Copyright
Copyright and related rights waived via CC0.
Same syntax for implements would be great as well:
from snekmate.tokens.interfaces import IERC20Permit
implements: erc.IERC20, erc.IERC20Detailed, IERC20Permit