Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

interface, abstract python?

from abc import ABC, abstractmethod

class AccountingSystem(ABC):

    @abstractmethod
    def create_purchase_invoice(self, purchase):
        pass

    @abstractmethod
    def create_sale_invoice(self, sale):
        log.debug('Creating sale invoice', sale)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #abstract
ADD COMMENT
Topic
Name
3+5 =