Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'argument': 0.05; 'args': 0.07; 'subject:adding': 0.07; 'subject:getting': 0.07; 'subject:help': 0.08; 'lawrence': 0.09; 'cc:addr:python-list': 0.11; 'brackets': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'notation': 0.16; 'subject:beginner': 0.16; 'subject:values': 0.16; 'wrote:': 0.18; 'slightly': 0.19; 'thu,': 0.19; 'appears': 0.22; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; "i've": 0.25; 'header :In-Reply-To:1': 0.27; 'fixed': 0.29; 'am,': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'that.': 0.31; 'though.': 0.31; 'url:python': 0.33; 'subject:the': 0.34; 'subject:from': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'url:org': 0.36; '12,': 0.39; 'subject:. ': 0.67; 'url:0': 0.67; 'square': 0.74; 'ambiguous': 0.84; 'careful': 0.91; 'to:none': 0.92; '2013': 0.98 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:cc :content-type; bh=mUViciJ/IDDMx+I2MqzLGd3FAwkjdk2lDdKyOJh0q5A=; b=oLZDCceCVs6cztzLJXkdlXdO0GXZtmkdI6Qi8sT3j84lwofK5K6F24Gp7q4dZDHgp2 EG6j0597O06fvobqwnNyIc9X6Dn6FQk/TAa1x3DzNuKaRXy2XXf1dgR/llUCNlQljC88 rA6Z0FzYhdFTBS8vQvFTWNIrgI68Bs4XYC/HbSzXSUBaaYb0tWCEuvdFMKscSg73cbJV gkCrXqzpJQIE2WVLpLB2Ef4jyOwLJPyGEMp1RoOiN7B7jJIEajmCEIDR9OLd1MY44rSW llig51AQ5l+DLPB5QM3VgX9FFJztqZlhvNVEQx5FluFGcHRyVV08JfmKjoUiqt3PDvjp onKw== MIME-Version: 1.0 X-Received: by 10.68.228.97 with SMTP id sh1mr4340787pbc.50.1386791217421; Wed, 11 Dec 2013 11:46:57 -0800 (PST) In-Reply-To: References: Date: Thu, 12 Dec 2013 06:46:57 +1100 Subject: Re: adding values from a csv column and getting the mean. beginner help From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386791221 news.xs4all.nl 2845 [2001:888:2000:d::a6]:39883 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61613 On Thu, Dec 12, 2013 at 6:41 AM, Mark Lawrence wrote: >> Square brackets in a usage description often mean "optional". You may >> want to be careful of that. There's no really good solution though. > > There is, https://pypi.python.org/pypi/docopt/0.6.1 :) That appears to use for a mandatory argument x, which is then slightly ambiguous with shell redirection. But that's the best notation I've ever seen for distinguishing mandatory args from fixed keywords. CrisA