4

I have this code:

class AppInterface(zope.interface.Interface):

    def required_function():
        pass

@zope.interface.implementer(AppInterface)
class DesktopApp:
    def other_function(self):
        print('Who I am')

I didn't write the required function in DekstopApp and it has to raise an error.
But this code works.
But when I use abc module if I don't write a required method I'll get an error.

What I should use abc or zope.interface?

Hahan't
  • 481
  • 1
  • 4
  • 11

0 Answers0