Slide 7
Slide 7 text
Create Interface
from zope.interface import Interface, Attribute
class ITebal(Interface):
halaman = Attribute('Berapa banyak halaman)
def hitung_tebal():
“””Hitung ketebalan suatu benda dari halaman”””
>>> coba = ITebal()
Traceback (most recent call last):
File “”, line 1, in
TypeError: Required argument 'obj' (pos 1) not found
>>>