[ZDP] BackTalk to Document Zope Developer's Guide (2.4 edition)/Zope Products

webmaster@zope.org webmaster@zope.org
Tue, 11 Feb 2003 19:10:17 -0500


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZDG/current/Products.stx#3-9

---------------

      Consider this interface for a multiple choice poll component (see
      "Poll.py":examples/Poll.py)::

        from Interface import Base

        class Poll(Base):
            "A multiple choice poll"

            def castVote(self, index):
                "Votes for a choice"

            def getTotalVotes(self):
                "Returns total number of votes cast"

            def getVotesFor(self, index):
                "Returns number of votes cast for a given response"

            def getResponses(self):
                "Returns the sequence of responses"

            def getQuestion(self):
                "Returns the question

        % dshafer - June 2, 2002 4:21 pm:
         The last comment in the interface is missing a closing quotation mark.

        % Anonymous User - Feb. 11, 2003 7:10 pm:
         Is it possible to use a variable to hold the value of the question ? I mean is the use of a method to access
         so simple information mandatory ?