Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.081 X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; 'elif': 0.05; 'assumed': 0.09; 'wrong,': 0.09; 'cc:addr:python-list': 0.11; '>>': 0.16; '==========': 0.16; 'fabio,': 0.16; 'fails.': 0.16; '\xc2\xa0if': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'year,': 0.18; '>>>': 0.22; 'cc:addr:python.org': 0.22; '>>>': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'this:': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'went': 0.31; 'yields': 0.31; 'url:python': 0.33; 'could': 0.34; 'equal': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'so,': 0.37; 'skip:& 10': 0.38; 'skip:& 20': 0.39; '12,': 0.39; 'url:mail': 0.40; 'even': 0.60; 'skip:\xc2 10': 0.60; 'course': 0.61; 'name': 0.63; 'afraid': 0.65; 'of:': 0.68; 'user,': 0.69; '8bit%:92': 0.71; '8bit%:100': 0.72; '8bit%:94': 0.72; 'how.': 0.84; 'subject:gets': 0.84; 'to:addr:support': 0.84; '8bit%:67': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=L7ssA35oUdf9WOYo0bNvgtFlxOKdO6cCzRQlmD6SDpI=; b=dplnZabFhaXn6KQbywtTDR5O7Ec87vYzBxw3iDdoQfX6oEaEdIC0KtkISMG0FOTZMt X6XBtiugTfi2TB6tQxQBMUP9XfcBJjRDJcrJE+4DX1Afavc9Xt94/RF8MkVDn1TlBOdD JCdOfnyE/kSDBWiu+CGcVRSDBa7/ha07H6se9eiAuNQksyiSOAi3OXP/n9CmvBs2UVN8 3GebvRCEUlLHMZhqBZRRqFTxTB05962alehT3IqTJsS+vZbDYFsZuWajqx/BJbMoAG74 swgX6jVMZLRcY5+thaou6Rt3d78n/oqQEofBWZIDhxoi1SGCvvZRHV0GliN5+WtXZIKc DLtQ== MIME-Version: 1.0 X-Received: by 10.229.18.13 with SMTP id u13mr7274391qca.138.1371031041506; Wed, 12 Jun 2013 02:57:21 -0700 (PDT) In-Reply-To: References: <2bc90d3b-09c2-4315-9357-ff7f039465e0@googlegroups.com> Date: Wed, 12 Jun 2013 10:57:21 +0100 Subject: Re: A certainl part of an if() structure never gets executed. From: =?ISO-8859-1?Q?F=E1bio_Santos?= To: =?ISO-8859-7?B?zenq/Ovh7/Igyu/98eHy?= Content-Type: multipart/alternative; boundary=0015176f0b9834aaa904def20ae8 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 135 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371031050 news.xs4all.nl 15939 [2001:888:2000:d::a6]:60274 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47769 --0015176f0b9834aaa904def20ae8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12 Jun 2013 10:29, "=CE=9D=CE=B9=CE=BA=CF=8C=CE=BB=CE=B1=CE=BF=CF=82 =CE= =9A=CE=BF=CF=8D=CF=81=CE=B1=CF=82" wrote: > > On 12/6/2013 12:07 =CE=BC=CE=BC, F=EF=BF=BDbio Santos wrote: >> >> On Wed, Jun 12, 2013 at 9:54 AM, =CE=9D=CE=B9=CE=BA=CF=8C=CE=BB=CE=B1=CE= =BF=CF=82 =CE=9A=CE=BF=CF=8D=CF=81=CE=B1=CF=82 wrote: >>> >>> but if enumerate yields 0 instead of '=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D' t= hen elif '=3D' not in >>> year of course fails. >>> >>> So, i must tell: >>> >>> for i, month in enumerate(months): >>> print('' % (i, month) ) >>> >>> to somehow return '=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D' instead of 0 but don= 't know how. >>> -- >>> http://mail.python.org/mailman/listinfo/python-list >> >> >> Well, you could try this: >> >>> for i, month in enumerate(months): >>> if i =3D=3D 0: >>> month =3D ('=3D' * 10) >>> print('' % (i, month) ) >> >> >> No? > > > I'am afraid not Fabio, i just tried byt sumbitting only the year, not name not month > > after printign the valeus to see what went wrong, the values look like: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 0 2010 > > instead of: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 2010 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D is the value of the month when its not sel= ected by the user, but even with your suggestions it reurns t0 intead of the equal signs..... > > -- > http://mail.python.org/mailman/listinfo/python-list Have you tried i =3D month =3D '=3D' * 10 I had assumed you just wanted those equal signs for the user display. --0015176f0b9834aaa904def20ae8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 12 Jun 2013 10:29, "=CE=9D=CE=B9=CE=BA=CF=8C=CE=BB=CE=B1=CE=BF=CF= =82 =CE=9A=CE=BF=CF=8D=CF=81=CE=B1=CF=82" <support@superhost.gr> wrote:
>
> On 12/6/2013 12:07 =CE=BC=CE=BC, F=EF=BF=BDbio Santos wrote:
>>
>> On Wed, Jun 12, 2013 at 9:54 AM, =CE=9D=CE=B9=CE=BA=CF=8C=CE=BB=CE= =B1=CE=BF=CF=82 =CE=9A=CE=BF=CF=8D=CF=81=CE=B1=CF=82 <support@superhost.gr> wrote:
>>>
>>> but if enumerate yields 0 instead of '=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D' then elif '=3D' not in
>>> year of course fails.
>>>
>>> So, i must tell:
>>>
>>> for i, month in enumerate(months):
>>> =C2=A0 =C2=A0 =C2=A0print('<option value=3D"%s&quo= t;> %s </option>' % (i, month) )
>>>
>>> to somehow return '=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D' ins= tead of 0 but don't know how.
>>> --
>>> http://mail.python.org/mailman/listinfo/python-list
>>
>>
>> Well, you could try this:
>>
>>> for i, month in enumerate(months):
>>> =C2=A0 =C2=A0 =C2=A0if i =3D=3D 0:
>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0month =3D ('=3D' * 1= 0)
>>> =C2=A0 =C2=A0 =C2=A0print('<option value=3D"%s&quo= t;> %s </option>' % (i, month) )
>>
>>
>> No?
>
>
> I'am afraid not Fabio, i just tried byt sumbitting only the year, = not name not month
>
> after printign the valeus to see what went wrong, the values look like= :
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 0 2010
>
> instead of:
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =C2=A020= 10
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D is the value of the month when its not = selected by the user, but even with your suggestions it reurns t0 intead of= the equal signs.....
>
> --
> http:/= /mail.python.org/mailman/listinfo/python-list

Have you tried

i =3D month =3D '=3D' * 10

I had assumed you just wanted those equal signs for the user= display.

--0015176f0b9834aaa904def20ae8--