Message from discussion
ten small Python programs
Path: g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder4.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!62.216.30.27.MISMATCH!newsgate.cistron.nl!transit.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path: <showel...@yahoo.com>
X-Original-To: python-l...@python.org
Delivered-To: python-l...@bag.python.org
X-Spam-Status: OK 0.007
X-YMail-OSG: .fuP3JoVM1mKewT_c5O49lCwdTfcuhBtoEd2lpMvYiSJdxXZp2sWf.yLmhEWjsKzir9OBpB8n1RlUL.qHqgDGLvoVKZXPUKUlvKAGrwv.f1rf2VndCa_3cSuF5zcoA--
Date: Sun, 27 May 2007 09:48:43 -0700 (PDT)
From: Steve Howell <showel...@yahoo.com>
Subject: Re: ten small Python programs
To: Wildemar Wildenburger <wilde...@freakmail.de>,
python-l...@python.org
In-Reply-To: <4659A7B0.2020605@freakmail.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-BeenThere: python-l...@python.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <http://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-requ...@python.org?subject=unsubscribe>
List-Archive: <http://mail.python.org/pipermail/python-list>
List-Post: <mailto:python-l...@python.org>
List-Help: <mailto:python-list-requ...@python.org?subject=help>
List-Subscribe: <http://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-requ...@python.org?subject=subscribe>
Newsgroups: comp.lang.python
Message-ID: <mailman.8265.1180284530.32031.python-list@python.org>
Lines: 36
NNTP-Posting-Host: 194.109.207.14
X-Trace: 1180284530 news.xs4all.nl 339 [::ffff:194.109.207.14]:48345
X-Complaints-To: abuse@xs4all.nl
--- Wildemar Wildenburger <wilde...@freakmail.de>
wrote:
> Steve Howell wrote:
> > # def defines a method in Python
> > def say_hello(name):
> > print 'hello', name
> > say_hello('Jack')
> > say_hello('Jill')
> >
> Doesn't def define methods *xor* functions,
> depending on the context?
> And in this example, say_hello (*yuck*, underscores
> ...) is certainly a
> function. Or is it that functions are considered
> "module-methods"?
>
Goodness, I didn't expect such a simple example to be
so controversial. But please see the new version
here:
http://wiki.python.org/moin/SimplePrograms
I changed the method name to "greet" and removed the
comment, as hopefully the intent of the program will
be pretty obvious to anyone that reads it.
____________________________________________________________________________________Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz