Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66260
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.029 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'referring': 0.07; 'result,': 0.07; 'def': 0.12; '>>': 0.16; 'clear.': 0.16; 'ought': 0.16; 'sequence.': 0.16; 'should.': 0.16; 'spam"': 0.16; 'subject: \n ': 0.16; 'subject:More': 0.16; 'travis': 0.16; 'wrote:': 0.18; 'value.': 0.19; 'feb': 0.22; '>>>': 0.22; 'input': 0.22; '>>>': 0.24; 'mathematical': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'message- id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'steven': 0.31; 'subject:other': 0.31; 'another': 0.32; 'received:google.com': 0.35; 'there': 0.35; 'functions.': 0.36; 'ordered': 0.36; 'should': 0.36; 'example,': 0.37; 'represent': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'skip:& 20': 0.39; '12,': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'even': 0.60; 'then,': 0.60; 'course': 0.61; 'such': 0.63; 'map': 0.64; 'provide': 0.64; 'between': 0.67; '2014,': 0.84; 'subject:!)': 0.84; 'subject:via': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=eNVbLsinAuR/OpFTdRGXHCtJPUbWMyy3l/bbe9P3KLo=; b=Tbe6YeA/RCp9QdVR17sWlEj3IkFTYwKZ2VdKySRUhXcMfyePtths0Yh+3bxm+qwJDr yrszqFG0n1f/G4MFnu/wmOjlcKtTdlpogXJzjhW/d9q4X2m3SiIzVl5mXDuHIYyNIztt YXPnDDKITmI1wPGt3glS85UhHBTFcIL3ScyEfobJUFRoqHo51A22CSFYJlNkxdIMdM4W GSvj4ww3RpSPh9+N4myRgdPYCAagPLYipITWr1zM69JDD7Al4fXRjsSPGBcBx2KJpuVg F/ALCKNjweLRSMqxzfqJncEav2AQbDwx7mHYDXwW69zU6OgU2IsZMzOYyWya/Ly7S+/c yWrg== |
| MIME-Version | 1.0 |
| X-Received | by 10.68.129.201 with SMTP id ny9mr4644000pbb.70.1392328805708; Thu, 13 Feb 2014 14:00:05 -0800 (PST) |
| In-Reply-To | <52fc45e6$0$11128$c3e8da3@news.astraweb.com> |
| References | <85c2698c-d681-4511-b111-bb1e549ece93@googlegroups.com> <52f9c392$0$11128$c3e8da3@news.astraweb.com> <mailman.6677.1392133008.18130.python-list@python.org> <52fc45e6$0$11128$c3e8da3@news.astraweb.com> |
| Date | Thu, 13 Feb 2014 15:00:05 -0700 |
| Subject | Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| To | Python <python-list@python.org> |
| Content-Type | multipart/alternative; boundary=047d7b10cae5dff6e304f250cf80 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6895.1392328815.18130.python-list@python.org> (permalink) |
| Lines | 79 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1392328815 news.xs4all.nl 2850 [2001:888:2000:d::a6]:39222 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:66260 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Feb 12, 2014 9:16 PM, "Steven D'Aprano" <steve@pearwood.info> wrote: > > On Tue, 11 Feb 2014 07:36:34 -0800, Travis Griggs wrote: > > > On Feb 10, 2014, at 10:30 PM, Steven D'Aprano <steve@pearwood.info> > > wrote: > > > > > >>> 1. Parenthesis should not be required for parameter- less > >>> functions. > >> > >> Of course they should. Firstly, parameter-less functions are a code- > >> smell, and ought to be discouraged. Secondly, even if you have a good > >> reason for using one -- for example, random.random -- then the > >> difference between referring to the object and calling the object > >> should be clear. > > > > Interesting. Can you clarify or provide some links to the > > "parameter-less functions are a code-smell" bit? > > > Functions map a value to another value. They can be one-to-one, or many- > to-one. (Mathematically, they cannot be one-to-many or many-to-many, > that's called a relation.) What about zero-to-one? > > If the function always returns the same result, e.g.: > > def spam(): > return "spam spam spam" That's still one-to-one. There is no such thing as a zero-to-one mapping. Mathematical functions map a single value to a single value. To represent multi-argument functions then, the single input takes on the value of an ordered sequence. The input value of a 0-argument function then is the empty sequence.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Rick Johnson <rantingrickjohnson@gmail.com> - 2014-02-10 10:45 -0800
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-10 19:15 +0000
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Ned Batchelder <ned@nedbatchelder.com> - 2014-02-10 14:17 -0500
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Rotwang <sg552@hotmail.co.uk> - 2014-02-10 21:12 +0000
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Ned Batchelder <ned@nedbatchelder.com> - 2014-02-10 17:00 -0500
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Terry Reedy <tjreedy@udel.edu> - 2014-02-10 17:59 -0500
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Chris Angelico <rosuav@gmail.com> - 2014-02-11 09:30 +1100
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Steven D'Aprano <steve@pearwood.info> - 2014-02-11 06:30 +0000
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Tim Chase <python.list@tim.thechases.com> - 2014-02-11 09:26 -0600
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Travis Griggs <travisgriggs@gmail.com> - 2014-02-11 07:36 -0800
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-02-11 18:07 +0200
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Chris Angelico <rosuav@gmail.com> - 2014-02-12 03:14 +1100
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Steven D'Aprano <steve@pearwood.info> - 2014-02-13 04:11 +0000
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Chris Angelico <rosuav@gmail.com> - 2014-02-13 15:30 +1100
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Roy Smith <roy@panix.com> - 2014-02-13 09:58 -0500
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Chris Angelico <rosuav@gmail.com> - 2014-02-14 06:17 +1100
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Tim Chase <python.list@tim.thechases.com> - 2014-02-13 05:39 -0600
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Tim Chase <python.list@tim.thechases.com> - 2014-02-13 05:51 -0600
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Ian Kelly <ian.g.kelly@gmail.com> - 2014-02-13 15:00 -0700
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Chris Angelico <rosuav@gmail.com> - 2014-02-12 02:52 +1100
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Travis Griggs <travisgriggs@gmail.com> - 2014-02-11 08:19 -0800
Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) Terry Reedy <tjreedy@udel.edu> - 2014-02-11 12:57 -0500
csiph-web