モジュールを使用zope.interface
して、いくつかのメソッドと属性を持つインターフェイスを宣言しています。また、どうにかして属性名だけでなく、その型も宣言できないのでしょうか?
from zope.interface import Interface, Attribute, implementer, verify
class IVehicle(Interface):
"""Any moving thing"""
speed = Attribute("""Movement speed""") #CANNOT I DECLARE ITS TYPE HERE?
def move():
"""Make a single step"""
pass