[ZDP] BackTalk to Document Zope Developer's Guide (2.4
edition)/Zope Products
webmaster at zope.org
webmaster at zope.org
Thu Apr 15 09:43:33 EDT 2004
A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZDG/current/Products.stx#3-10
---------------
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 ?
% Anonymous User - Apr. 15, 2004 9:43 am:
Interfaces are supposed to only have methods, and no variables.
More information about the ZDP
mailing list