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

webmaster@zope.org webmaster@zope.org
Fri, 22 Nov 2002 02:04:20 -0500


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

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

      You can use this class interactively and test it. Here's an
      example of interactive testing::

        >>> from PollImplementation import PollImplementation
        >>> p=PollImplementation("What's your favorite color?", ["Red", "Green", "Blue", "I forget"])
        >>> p.getQuestion()
        "What's your favorite color?"
        >>> p.getResponses()
        ('Red', 'Green', 'Blue', 'I forget')
        >>> p.getVotesFor(0)
        0
        >>> p.castVote(0)
        >>> p.getVotesFor(0)
        1
        >>> p.castVote(2)
        >>> p.getTotalVotes()
        2
        >>> p.castVote(4)
        Traceback (innermost last):
        File "<stdin>", line 1, in ?
        File "PollImplementation.py", line 23, in castVote
        self._votes[index] = self._votes[index] + 1
        KeyError: 4          

        % Anonymous User - Mar. 14, 2002 8:47 pm - linesaretoowideandnooneseemstoeverthinkoftheeffectthishasonwebpagesespeciallywhenformattedwithintablesandusingpreblocksiseethisallthetimeonsiteespeciallywhendevelopersprintcodeanditannoysthehelloutofmesoijustthoughtiwouldsharetheannoyanceandmaybesomeonewilldosomethingeventuallytofixit.

        % Anonymous User - May 8, 2002 1:33 am:
         Correction of previous post by Anonymous Asshole:
         lines are too wide and no one seems to ever think of the effect this has on web pages especially when
         formatted within tables and using preblocks. I i see this all the time on (this?) site, especially when
         developers print code and it annoys the hell out of me so I just thought I would share the annoyance and
         maybe someone will do something eventually to fix it.

        % Anonymous User - Nov. 22, 2002 2:04 am:
         The Anonymous Asshole thanks whowever is responsible for fixing up the CSS so long lines aren't such a
         horrendous viewing problem any longer. Nice job. This comment and the two above should be removed, as the
         problem is resolved.