Re[2]: email notification and abstract methods

nemilya <nemilya-JGs/[email protected]> Sat, 15 Nov 2003 21:12:29 +0500
Newsgroups gmane.comp.web.syncato.general
Organization home
Message-ID <[email protected]>
>> But abstract function are not marked out in code of this class.
>> I think it would be clearer for understunding, if add to
>> BaseDatabase.py:

KS> OK, I added these.

Thanks, but I think that exists else more better variant :)
This variant - definition interface (just abstract class), f.e.
'IDatabase'. In reality Weblog class works with interface (from
logical point of view).

And the 'BaseDatabase' class will inheritance from it:

class BaseDatabase(IDatabase):
...

# IDatabase.py
class IDatabase:

    def addRecord(self, record):
        pass

    def deleteRecord(self, recordID):
        pass

    def getNextID(self):
        pass

    def getPathData(self, xpath):
        pass

    def getPathDataForRecord(self, recordID, xpath):
        pass

    def getRecord(self, recordID):
        pass

    def getRecordDocument(self, recordID, txn=None):
        pass

    def shutdown(self):
        pass

    def updateRecord(self, recordID, record):
        pass




-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl