Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #99572
| From | John Gordon <gordon@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: if else python |
| Date | 2015-11-26 13:25 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <n3718l$7an$1@reader1.panix.com> (permalink) |
| References | <mailman.51.1448431821.20593.python-list@python.org> |
In <mailman.51.1448431821.20593.python-list@python.org> Scott Montreuil <scott@zml.ca> writes:
> I have an if statement which seems to run both commands and I cannot
> figure out why.
I'm not sure what you mean by "both commands". Do you mean that the
'if' and 'else' branches both execute?
Your if/else branches are in a loop, so perhaps you're seeing the 'if'
branch on one loop iteration, anf the 'else' branch on the next iteration?
I see that your if and else branches both contain a screen.addstr()
call. Are you seeing both of these outputs?
--
John Gordon A is for Amy, who fell down the stairs
gordon@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
if else python Scott Montreuil <scott@zml.ca> - 2015-11-25 03:45 +0000 Re: if else python Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-11-25 11:10 +0000 Re: if else python John Gordon <gordon@panix.com> - 2015-11-26 13:25 +0000
csiph-web