[Pythonmac-SIG] XML handler design

Henning.Ramm at mediapro-gmbh.de Henning.Ramm at mediapro-gmbh.de
Thu Mar 24 15:25:17 CET 2005


>>>> def getPages(self):
>>>>     return self.pages.getSortedArray()
>>>>
>>>> def getPage(self, no):
>>>>     return self.pages[no]

>My style is to create/build a data structure in the parser and have a 
>single get... method that will give me the result.
>Your getPage/getPages would be part of the objects in the data 
>structure.

As you see my get methods aren't much more than redirections to the
object's own methods - one could access them directly via
MyHandler.pages[12] or MyHandler.pages,getSortedArray()

Best regards,
Henning Hraban Ramm
Südkurier Medienhaus / MediaPro
Support/Admin/Development Dept.


More information about the Pythonmac-SIG mailing list