Questions regarding design decisions in listobject.c
Frédéric van der Plancke
fplancke at my-deja.com
Mon Jun 5 14:25:50 EDT 2000
In article <oqvgzo9npk.fsf at titan.progiciels-bpi.ca>,
=?ISO-8859-1?Q?Fran=E7ois_Pinard?= <pinard at iro.umontreal.ca> wrote:
> Courageous <jkraska1 at san.rr.com> writes:
>
> > Well, yeah, but [0:3] as "element zero through three, inclusive"
>
> Read 0 up to 3, but not including it.
> That notation is very, very handsome
> and useful. It is one of the jewels of Python.
> You did not see it yet?
> I fear you still write too much C, and too little Python :-) :-).
Too much C ? I don't think so, if you consider the usual C idiom:
for (i = 0; i < 3; ++i)
add_to_my_slice(a[i])
I think C itself may have inspired the design decision (but I agree
with other people's arguments in favour of it).
Just my 0.02e worth...
--
Frederic van der Plancke
e-mail address: reverse and add dots etc. to:
<com writeme vdplancke frederic>
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list