Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.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; 'skip:[ 20': 0.04; 'subject:adding': 0.07; 'subject:getting': 0.07; 'subject:help': 0.08; 'typed': 0.09; '-tkc': 0.16; 'args,': 0.16; 'exactly?': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'keyword,': 0.16; 'subject: \n ': 0.16; 'subject:beginner': 0.16; 'subject:values': 0.16; 'then?': 0.16; 'wrote:': 0.18; 'command': 0.22; 'specify': 0.24; 'text.': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'text': 0.33; 'subject:the': 0.34; 'subject:from': 0.34; 'but': 0.35; 'charset:us-ascii': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'show': 0.63; 'subject:. ': 0.67; 'common,': 0.84; 'received:50.22': 0.84 Date: Wed, 11 Dec 2013 14:20:42 -0600 From: Tim Chase To: python-list@python.org Subject: Re: adding values from a csv column and getting the mean. beginner help In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386793170 news.xs4all.nl 2870 [2001:888:2000:d::a6]:51997 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61617 On 2013-12-12 07:03, Chris Angelico wrote: > Also common, but how do you specify a keyword, then? Say you have a > command with subcommands: > > $0 foo x y > Move the foo to (x,y) > $0 bar x y z > Go to bar X, order a Y, and Z it [eg 'compress', 'gzip', 'drink'] > > How do you show that x/y/z are mandatory args, but foo/bar are > keywords to be typed exactly? In some formats italicized text can > make that distinction, but not in pure text. I prefer {} notation: $0 mv [--optional] {x} {y} $0 bar [--mutually|--exclusive] {x} {y} {z} -tkc