On Aug 29, 10:11 am, Roy Smith <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
>  Grant Edwards <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On 2008-08-29, Roy Smith <[EMAIL PROTECTED]> wrote:
>
> > > Exactly.  This is one of those little pieces of syntactic
> > > sugar which makes python so nice to work with.  The
> > > alternative is (in C, for example) abominations like this:
>
> > > const char* l[] = {"foo"
> > >                  , "bar"
> > >                  , "baz"
> > >                  };
>
> > > and even those are not quite as good because you still have to
> > > special-case the first entry.
>
> > It's probably a spec violation, but I've never seen a C
> > compiler that objected to a comma after the last item in an
> > initializer list.  (At least not at the warning levels I use,
> > which tend to be on the picky side.)
>
> Yowza, you're right (at least for the one case I tried).  This must be a
> new development (where "new development" is defined as, "It wasn't legal in
> the original K&R C I learned when I was a pup").

That's the difference between a specification and
an implementation, isn't it?

>
> Still, I have seem people do that in code.- Hide quoted text -
>
> - Show quoted text -

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to