Re: OT: Why is C so popular?
From: Ron Johnson (ron.l.johnson_at_cox.net)
Date: 08/30/03
- Previous message: moseley_at_hank.org: "Piping file to scp"
- In reply to: Pigeon: "Re: OT: Why is C so popular?"
- Next in thread: Steve Lamb: "Re: OT: Why is C so popular?"
- Reply: Steve Lamb: "Re: OT: Why is C so popular?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Debian-User <debian-user@lists.debian.org> Date: Sat, 30 Aug 2003 00:28:24 -0500
On Fri, 2003-08-29 at 20:58, Pigeon wrote:
> On Fri, Aug 29, 2003 at 04:44:33PM -0700, Steve Lamb wrote:
> > On Fri, 29 Aug 2003 20:01:23 +0100
> > Pigeon <jah.pigeon@ukonline.co.uk> wrote:
> > > Oh, that's interesting - the for loop's running from 0 to 9, so it
> > > prints "81", not "100".
> >
> > Yes, range(x) does 0 to x-1. This is for stuff like this (and this is a
> > bad example)...
> >
> > for x in range(10):
> > baz[x] = foo[x] + bar[x]
>
> ...so array indices work like C, then. OK!
Python is written in C (no surprise there!), but what is surprising
to some is that so many C-isms are in Python. For example:
IF FOO == BAR:
PRINT 'YES'
Also, many modules are full of methods that are nothing but wrappers
around C library calls, and thus have roughly the same parameter
lists and calling sequences.
-- ----------------------------------------------------------------- Ron Johnson, Jr. ron.l.johnson@cox.net Jefferson, LA USA 4 degrees from Vladimir Putin -- To UNSUBSCRIBE, email to debian-user-request@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
- Previous message: moseley_at_hank.org: "Piping file to scp"
- In reply to: Pigeon: "Re: OT: Why is C so popular?"
- Next in thread: Steve Lamb: "Re: OT: Why is C so popular?"
- Reply: Steve Lamb: "Re: OT: Why is C so popular?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|