brent timothy saner on 13 Sep 2017 11:54:35 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Why Can't Programmers.. Program?


On 09/13/2017 02:34 PM, Will wrote:
> I've actually seen wrong solutions from people I had respect for. Also
> how dare someone make a for loop in python without using the range
> keyword!!!!
> 
> -Will
> 

i dunno about others, but generally i only use range() if i need dynamic
or negative stepping in a number list; when dealing with a static
numbering list it seems more readable to just use a loop with a counter.

plus it's a bit less backwards-compatible with python 2; the start,
stop, and step parameters weren't introduced until 3.3. a loop with a
counter works on both. :)

Attachment: signature.asc
Description: OpenPGP digital signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug