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


Groups > comp.lang.python > #21714

Re: Enchancement suggestion for argparse: intuit type from default

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <cameron@cskk.homeip.net>
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; 'backwards': 0.07; 'coders': 0.07; 'received:edu.au': 0.07; 'deprecated': 0.09; "(we'd": 0.16; 'argparse': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'kern': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:202.125.174': 0.16; 'received:202.125.174.133': 0.16; 'received:boardofstudies.nsw.edu.au': 0.16; 'received:cskk.homeip.net': 0.16; 'received:harvey.boardofstudies.nsw.edu.au': 0.16; 'received:homeip.net': 0.16; 'received:nsw.edu.au': 0.16; 'renaming': 0.16; 'roy': 0.16; 'subject:argparse': 0.16; 'cc:addr :python-list': 0.16; 'wrote:': 0.18; 'cc:no real name:2**0': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'gregory': 0.23; 'string': 0.24; 'cc:2**0': 0.26; 'function': 0.27; 'value.': 0.28; "i'm": 0.28; 'cc:addr:python.org': 0.29; 'object.': 0.30; 'yes.': 0.30; 'idea': 0.32; 'header:User-Agent:1': 0.33; 'too': 0.33; 'agree': 0.33; 'object': 0.33; 'certain': 0.34; 'something': 0.35; 'received:au': 0.36; 'created': 0.37; 'charset:us-ascii': 0.37; 'subject:from': 0.39; 'called': 0.40; 'change': 0.40; 'type': 0.61; 'your': 0.61; 'received:202': 0.66; 'article': 0.73; 'cameron': 0.77; 'beer,': 0.84; 'endowed': 0.84; 'pursuit': 0.91
Date Fri, 16 Mar 2012 08:18:57 +1100
From Cameron Simpson <cs@zip.com.au>
To Roy Smith <roy@panix.com>
Subject Re: Enchancement suggestion for argparse: intuit type from default
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <roy-10B7E6.09280115032012@news.panix.com>
User-Agent Mutt/1.5.21 (2010-09-15)
References <roy-10B7E6.09280115032012@news.panix.com>
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.704.1331846230.3037.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1331846230 news.xs4all.nl 6894 [2001:888:2000:d::a6]:40311
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:21714

Show key headers only | View raw


On 15Mar2012 09:28, Roy Smith <roy@panix.com> wrote:
| In article <mailman.665.1331806024.3037.python-list@python.org>,
|  Robert Kern <robert.kern@gmail.com> wrote:
| > Yes. Not all type(default) types can be called with a string to produce a 
| > valid 
| > value. Note that "type=" is really a misnomer. argparse doesn't really want a 
| > type object there; it wants a converter function that takes a string to an 
| > object.
| 
| Orthogonal to my original suggestion, I agree that this is misnamed.  
| I'm +1 on the idea of renaming it to conversion= or something like that 
| (we'd need to keep type= around as a deprecated synonym for backwards 
| compatability).  It's really hard to get your head around "type=open".

"factory"? Anyway, far too late to change this now!
-- 
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

all coders are created equal; that they are endowed with certain
unalienable rights, of these are beer, net connectivity, and the
pursuit of bugfixes...  - Gregory R Block

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


Thread

Enchancement suggestion for argparse: intuit type from default roy@panix.com (Roy Smith) - 2012-03-13 17:08 -0400
  Re: Enchancement suggestion for argparse: intuit type from default Ben Finney <ben+python@benfinney.id.au> - 2012-03-14 08:35 +1100
    Re: Enchancement suggestion for argparse: intuit type from default Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-03-14 12:53 +0000
      Re: Enchancement suggestion for argparse: intuit type from default Ben Finney <ben+python@benfinney.id.au> - 2012-03-15 00:19 +1100
        Re: Enchancement suggestion for argparse: intuit type from default Roy Smith <roy@panix.com> - 2012-03-14 09:30 -0400
          Re: Enchancement suggestion for argparse: intuit type from default MRAB <python@mrabarnett.plus.com> - 2012-03-14 17:26 +0000
          Re: Enchancement suggestion for argparse: intuit type from default Ian Kelly <ian.g.kelly@gmail.com> - 2012-03-14 13:03 -0600
  Re: Enchancement suggestion for argparse: intuit type from default rusi <rustompmody@gmail.com> - 2012-03-14 03:22 -0700
  Re: Enchancement suggestion for argparse: intuit type from default Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-03-14 13:26 +0100
  Re: Enchancement suggestion for argparse: intuit type from default John Nagle <nagle@animats.com> - 2012-03-14 16:32 -0700
    Re: Enchancement suggestion for argparse: intuit type from default Roy Smith <roy@panix.com> - 2012-03-14 20:52 -0400
      Re: Enchancement suggestion for argparse: intuit type from default Ben Finney <ben+python@benfinney.id.au> - 2012-03-15 12:22 +1100
        Re: Enchancement suggestion for argparse: intuit type from default Cameron Simpson <cs@zip.com.au> - 2012-03-15 16:59 +1100
        Re: Enchancement suggestion for argparse: intuit type from default Robert Kern <robert.kern@gmail.com> - 2012-03-15 10:06 +0000
          Re: Enchancement suggestion for argparse: intuit type from default Roy Smith <roy@panix.com> - 2012-03-15 09:28 -0400
            Re: Enchancement suggestion for argparse: intuit type from default Cameron Simpson <cs@zip.com.au> - 2012-03-16 08:18 +1100
      Re: Enchancement suggestion for argparse: intuit type from default MRAB <python@mrabarnett.plus.com> - 2012-03-15 02:10 +0000

csiph-web