Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.albasani.net!.POSTED!not-for-mail From: Thomas Rachel Newsgroups: comp.lang.python Subject: Re: A certainl part of an if() structure never gets executed. Date: Wed, 26 Jun 2013 11:07:48 +0200 Organization: A not so newly installed InterNetNews server Lines: 31 Message-ID: References: <2bc90d3b-09c2-4315-9357-ff7f039465e0@googlegroups.com> <7bf085ea-001f-4eed-9ed9-75f12165ac79@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net V+H8LSHGrRYwSO7B+22Myxoi9IpcSymstsJZx+HOa6PqnIwsthVPjJtnAwp1ttmm3puScUdCJypQdvkL6VZloxm9V4Zsk4YYJUu0NgJ9V4Fe41EjLJZkzK7/rDgRdVMQ NNTP-Posting-Date: Wed, 26 Jun 2013 09:10:02 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="HLxTLlVo1TEg6w1iVSgqUTCmZ3VCMKwCKBan/1c6lMHsvMz7vw3VP+tVC+AqepjutMQfPdGvV/jEaVV1ViP7gcigL8lHz3glmSm00sTpRMaNqF22gxhcPrm3lrGF6NiM3yvgn8BjAPbj6wO4PZb7X7jXGL+Hts4O1A47L3cNpHA="; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 Hamster/2.1.0.11 In-Reply-To: <7bf085ea-001f-4eed-9ed9-75f12165ac79@googlegroups.com> Cancel-Lock: sha1:g10fV0/yWYegvGSnvA+R9zLfLiw= Xref: csiph.com comp.lang.python:49238 Am 12.06.2013 03:46 schrieb Rick Johnson: > On Tuesday, June 11, 2013 8:25:30 PM UTC-5, nagia....@gmail.com wrote: > >> is there a shorter and more clear way to write this? >> i didnt understood what Rick trie to told me. > > My example included verbatim copies of interactive sessions within the Python command line. You might understand them better if you open the Python command line and type each command in one-by-one. Here is an algoritm that explains the process: > > open_command_window() > whilst learning or debugging: > type_command() > press_enter() > observe_output() > if self.badder.is_full: > take_potty_break() > close_command_window() with command_window(): whilst learning or debugging: type_command() press_enter() observe_output() if self.badder.is_full: take_potty_break() looks nicer. SCNR Thomas