Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: William Ray Wing Newsgroups: comp.lang.python Subject: Re: [beginner] What's wrong? Date: Sat, 02 Apr 2016 00:54:21 -0400 Lines: 35 Message-ID: References: <99234e90-fcd4-4a05-b97f-b47228dde20c@googlegroups.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de LH6vara2AoDZVVlUylZBKwKCIgCDZYBuZrvVw/glN8fQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.055 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'subject:: [': 0.03; 'friday,': 0.07; "they've": 0.09; 'url:mit': 0.09; 'zero.': 0.09; 'python': 0.10; '2016': 0.16; 'ass': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:beginner': 0.16; 'wrote:': 0.16; 'received:10.0.1': 0.18; 'language': 0.19; 'subject:] ': 0.19; '>>>': 0.20; 'to:2**1': 0.21; 'lawrence': 0.22; 'bit': 0.23; 'url:edu': 0.24; "i've": 0.25; "doesn't": 0.26; 'executing': 0.27; 'received:17': 0.27; 'actual': 0.28; 'adequate': 0.29; "i'm": 0.30; 'url:mailman': 0.30; 'certainly': 0.30; "can't": 0.32; 'bill': 0.32; 'language.': 0.32; 'url:python': 0.33; 'michael': 0.33; 'url:listinfo': 0.34; 'received:10.0': 0.34; 'info': 0.34; 'behind': 0.35; "isn't": 0.35; 'but': 0.36; 'should': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'received:10': 0.37; 'charset:us-ascii': 0.37; 'why': 0.39; 'enough': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'where': 0.40; 'mark': 0.40; 'header:MIME-version:1': 0.60; 'care': 0.60; 'email addr:gmail.com': 0.62; 'times': 0.63; 'our': 0.64; '20,': 0.66; 'python-list': 0.66; 'gotten': 0.76; 'header :In-reply-to:1': 0.84; 'improved.': 0.84; 'pythonistas,': 0.84; 'to:addr:yahoo.co.uk': 0.84; 'to:name:python': 0.84; 'utc-7,': 0.84; 'mistake': 0.91; 'reside': 0.91; 'step.': 0.91 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-04-02_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1604020064 In-reply-to: X-Mailer: iPad Mail (13E233) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:106275 > On Apr 1, 2016, at 6:57 PM, Mark Lawrence via Python-list wrote: >=20 >> On 01/04/2016 23:44, sohcahtoa82@gmail.com wrote: >>> On Friday, April 1, 2016 at 3:10:51 PM UTC-7, Michael Okuntsov wrote: >>> Nevermind. for j in range(1,8) should be for j in range(8). >>=20 >> I can't tell you how many times I've gotten bit in the ass with that off-= by-one mistake whenever I use a range that doesn't start at zero. >>=20 >> I know that if I want to loop 10 times and I either want to start at zero= or just don't care about the actual number, I use `for i in range(10)`. Bu= t if I want to loop from 10 to 20, my first instinct is to write `for i in r= ange(10, 20)`, and then I'm left figuring out why my loop isn't executing th= e last step. >=20 > "First instinct"? "I expected"? The Python docs might not be perfect, bu= t they were certainly adequate enough to get me going 15 years ago, and sinc= e then they've improved. So where is the problem, other than failure to RTFM= ? >=20 I've always found it vaguely amusing that the server(s) for just about all t= he technical info at MIT reside behind http://rtfm.mit.edu Bill > --=20 > My fellow Pythonistas, ask not what our language can do for you, ask > what you can do for our language. >=20 > Mark Lawrence >=20 > --=20 > https://mail.python.org/mailman/listinfo/python-list