Difference between default arguments and keyword arguments

John Roth newsgroups at jhrothjr.com
Sun Apr 4 21:23:00 EDT 2004


"Edward Diener" <eldiener at earthlink.net> wrote in message
news:yD1cc.12064$yN6.3263 at newsread2.news.atl.earthlink.net...
> Roy Smith wrote:
> > "John Roth" <newsgroups at jhrothjr.com> wrote:
> >> In going through the tutorial I also noticed that it explained
> >> the * notation, but not the ** notation. I think this also needs
> >> to be repaired - if one is in the tutorial, both should be.
> >
> > I suspect this will be an unpopular opinion, but I don't think either
> > belong in the tutorial.

I certainly wouldn't object to removing them; that's why I said "if".

> > I think the function of a tutorial is to introduce somebody to the
> > main features of the language, not cover every nook and cranny of the
> > syntax. The * and ** syntaxes (synti?), while certainly useful, are
> > also somewhat advanced topics.  I think their appearance in an
> > introductory document is misplaced.
>
> Along the same lines, I would like to add to that the explanation for
> classes in the tutorial is very poor since it assumes a much higher
> understanding of Python than a tutorial should about the language. A much
> simpler and more direct explanation regarding classes in Python would be
> much better. While I mostly got it because I have programmed extensively
in
> other OOP languages, I would expect your average Python beginner to be
> completely lost by much of the high-level explanation in that chapter.
> Whoever wrote it was much more interested in explaining the theory of
> classes in Python, to beginners no less !, than they were toward
explaining
> what classes are in Python and how to use them. And why iterators and
> generators are included in that chapter are beyond me. Also the tutorial
> mentions some usages of classes, in previous sections, before the
> explanation of classes occur, which I feel is definitely a mistake.

One of the things going on here is that the tutorial has grown over
the releases; it's not entirely clear what level of expertise is expected
for a reader.  As you say, there are topics that are fairly advanced.
On the other hand, since the libraries are shipped in source, and since
they do use all of those features, I think they should be mentioned in
some kind of tuorial.

John Roth
>
>





More information about the Python-list mailing list