Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #59518

Re: understanding someone else's program

Path csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <wrw@mac.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.042
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'ide': 0.09; 'variables.': 0.09; 'cc:addr:python-list': 0.11; 'suggest': 0.14; 'doing,': 0.16; 'received:mac.com': 0.16; 'stepping': 0.16; 'subject:program': 0.16; 'subject:skip:u 10': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'all,': 0.19; 'received:10.0.1': 0.19; 'thanks.': 0.20; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'cc:no real name:2**0': 0.24; '15,': 0.26; 'certain': 0.27; 'function': 0.29; 'am,': 0.29; 'points': 0.29; 'url:mailman': 0.30; 'code': 0.31; 'trace': 0.31; 'url:python': 0.33; 'running': 0.33; "i'd": 0.34; 'add': 0.35; 'there': 0.35; 'url:listinfo': 0.36; 'charset:us-ascii': 0.36; 'received:10.0': 0.36; 'url:org': 0.36; 'received:10': 0.37; 'nov': 0.38; 'received:17': 0.38; 'url:mail': 0.40; 'how': 0.40; 'break': 0.61; 'making': 0.63; 'places': 0.64; 'to:addr:gmail.com': 0.65; "else's": 0.84; 'header :In-reply-to:1': 0.84; 'start.': 0.84; 'subject:else': 0.84; '2013,': 0.91
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:5.10.8794,1.0.14,0.0.0000 definitions=2013-11-15_02:2013-11-15,2013-11-15,1970-01-01 signatures=0
X-Proofpoint-Spam-Details rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1308280000 definitions=main-1311150065
Content-type text/plain; charset=us-ascii
MIME-version 1.0 (Mac OS X Mail 6.6 \(1510\))
Subject Re: understanding someone else's program
From William Ray Wing <wrw@mac.com>
In-reply-to <19cb1c85-1c01-4c53-a26a-29f96c5926eb@googlegroups.com>
Date Fri, 15 Nov 2013 08:50:02 -0500
Content-transfer-encoding quoted-printable
References <19cb1c85-1c01-4c53-a26a-29f96c5926eb@googlegroups.com>
To "C. Ng" <ngcbmy@gmail.com>
X-Mailer Apple Mail (2.1510)
Cc python-list@python.org, William Ray Wing <wrw@mac.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2652.1384523402.18130.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1384523402 news.xs4all.nl 15973 [2001:888:2000:d::a6]:33337
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:59518

Show key headers only | View raw


On Nov 15, 2013, at 6:05 AM, C. Ng <ngcbmy@gmail.com> wrote:

> Hi all,
> 
> Please suggest how I can understand someone else's program where
> - documentation is sparse
> - in function A, there will be calls to function B, C, D.... and in those functions will be calls to functions R,S,T.... and so on so forth... making it difficult to trace what happens to a certain variable
> 
> Am using ERIC4 IDE.
> 
> Thanks.
> -- 
> https://mail.python.org/mailman/listinfo/python-list

The other suggestions you have received are good places to start.  I'd add only one other - that you consider running the code inside an IDE and single-stepping through as you watch what happens to the variables.  As you get a better and better feel for what the code is doing, you can move up from single stepping to setting break points before and after places you are still scratching you head over.

-Bill

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

understanding someone else's program "C. Ng" <ngcbmy@gmail.com> - 2013-11-15 03:05 -0800
  Re: understanding someone else's program Ben Finney <ben+python@benfinney.id.au> - 2013-11-15 22:19 +1100
  Re: understanding someone else's program Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-15 08:39 -0500
  Re: understanding someone else's program William Ray Wing <wrw@mac.com> - 2013-11-15 08:50 -0500
  Re: understanding someone else's program Chris Angelico <rosuav@gmail.com> - 2013-11-16 01:03 +1100
  Re: understanding someone else's program Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-15 17:41 +0000
  Re: understanding someone else's program Laurent Pointal <laurent.pointal@free.fr> - 2013-11-18 23:42 +0100

csiph-web