Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2880

Re: Argument of the bool function

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!news2.glorb.com!news.astraweb.com!border6.newsrouter.astraweb.com!not-for-mail
From Ben Finney <ben+python@benfinney.id.au>
Newsgroups comp.lang.python
Subject Re: Argument of the bool function
References <4d9f374b$0$12803$426a34cc@news.free.fr> <mailman.155.1302281042.9059.python-list@python.org> <4d9f7efc$0$1065$426a74cc@news.free.fr>
X-Public-Key-ID 0xAC128405
X-Public-Key-Fingerprint 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405
X-Public-Key-URL http://www.benfinney.id.au/contact/bfinney-pubkey.asc
X-Post-From Ben Finney <bignose+hates-spam@benfinney.id.au>
Date Sat, 09 Apr 2011 07:57:48 +1000
Message-ID <87k4f4e78j.fsf@benfinney.id.au> (permalink)
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
Cancel-Lock sha1:3GHBSrvt8S0Dn037zZN69uFoD4o=
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Lines 22
Organization Unlimited download news at news.astraweb.com
NNTP-Posting-Host dcec4657.news.astraweb.com
X-Trace DXC=SohJN4;o]\Kc_WgCkn9MLEL?0kYOcDh@J7^o:UA4R?cEaYW9XoKNQFD]G;2>V^?kWCbEW9A[5UK?ENZ[SL`C\KgCIc`EPInoZSA
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:2880

Show key headers only | View raw


candide <candide@free.invalid> writes:

> Le 08/04/2011 18:43, Ian Kelly a écrit :

> > In "bool(x=5)", "x=5" is also not an expression. It's passing the
> > expression "5" in as the parameter x, using a keyword argument.
>
> You are probably right but how do you deduce this brilliant
> interpretation from the wording given in the documentation ?

By also learning the language syntax. ‘foo=bar’ within the parameters to
a function call will always mean binding a value to a keyword argument.

Just as the function docstring should not spend any space to explain
what the parens mean, it should not spend any space to explain how to
pass keyword arguments.

-- 
 \          “When [science] permits us to see the far side of some new |
  `\      horizon, we remember those who prepared the way – seeing for |
_o__)                          them also.” —Carl Sagan, _Cosmos_, 1980 |
Ben Finney

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Argument of the bool function candide <candide@free.invalid> - 2011-04-08 18:26 +0200
  Re: Argument of the bool function Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-04-08 12:41 -0400
    Re: Argument of the bool function candide <candide@free.invalid> - 2011-04-10 14:54 +0200
      Re: Argument of the bool function Chris Angelico <rosuav@gmail.com> - 2011-04-10 23:02 +1000
        Re: Argument of the bool function Mel <mwilson@the-wire.com> - 2011-04-10 12:21 -0400
          Re: Argument of the bool function "Colin J. Williams" <cjw@ncf.ca> - 2011-04-10 13:51 -0400
          Re: Argument of the bool function Ben Finney <ben+python@benfinney.id.au> - 2011-04-11 09:46 +1000
          Re: Argument of the bool function Ethan Furman <ethan@stoneleaf.us> - 2011-04-11 16:00 -0700
          Re: Argument of the bool function Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-25 16:29 +0200
            Re: Argument of the bool function Chris Angelico <rosuav@gmail.com> - 2011-04-26 05:33 +1000
              Re: Argument of the bool function Paul Rubin <no.email@nospam.invalid> - 2011-04-25 16:26 -0700
                Re: Argument of the bool function Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-26 02:38 +0000
            Re: Argument of the bool function Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-25 23:28 +0200
              Re: Argument of the bool function Ian Kelly <ian.g.kelly@gmail.com> - 2011-04-25 17:44 -0600
  Re: Argument of the bool function Mel <mwilson@the-wire.com> - 2011-04-08 16:42 +0000
  Re: Argument of the bool function Ian Kelly <ian.g.kelly@gmail.com> - 2011-04-08 10:43 -0600
    Re: Argument of the bool function candide <candide@free.invalid> - 2011-04-08 23:32 +0200
      Re: Argument of the bool function Ethan Furman <ethan@stoneleaf.us> - 2011-04-08 15:03 -0700
        Re: Argument of the bool function candide <candide@free.invalid> - 2011-04-09 00:59 +0200
          Re: Argument of the bool function Lie Ryan <lie.1296@gmail.com> - 2011-04-09 15:45 +1000
            Re: Argument of the bool function Grant Edwards <invalid@invalid.invalid> - 2011-04-10 03:35 +0000
              Re: Argument of the bool function rusi <rustompmody@gmail.com> - 2011-04-09 21:15 -0700
                Re: Argument of the bool function Robert Kern <robert.kern@gmail.com> - 2011-04-10 01:22 -0500
          Re: Argument of the bool function Robert Kern <robert.kern@gmail.com> - 2011-04-09 18:22 -0500
            Re: Argument of the bool function candide <candide@free.invalid> - 2011-04-10 02:33 +0200
      Re: Argument of the bool function Ben Finney <ben+python@benfinney.id.au> - 2011-04-09 07:57 +1000

csiph-web