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


Groups > comp.lang.python > #52511

Re: Am I not seeing the Error?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <joshua.landau.ws@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:not': 0.03; 'output': 0.05; 'root': 0.05; 'differently': 0.07; 'modify': 0.07; 'subject:Error': 0.07; 'append': 0.09; 'arguments': 0.09; 'arguments,': 0.09; 'operator,': 0.09; 'skip:/ 10': 0.09; 'so?': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '13:07,': 0.16; 'argument.': 0.16; 'behave': 0.16; 'command.': 0.16; 'stdout': 0.16; 'superfluous': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'wed,': 0.18; 'input': 0.22; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'equivalent': 0.26; 'read,': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; 'am,': 0.29; 'especially': 0.30; 'message- id:@mail.gmail.com': 0.30; 'pipe': 0.31; 'maybe': 0.34; 'subject:the': 0.34; 'could': 0.34; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; '14,': 0.36; 'subject:?': 0.36; 'wrong': 0.37; 'others.': 0.38; 'sure': 0.39; 'letters': 0.60; 'august': 0.61; 'matter': 0.61; 'simply': 0.61; "you're": 0.61; 'to:addr:gmail.com': 0.65; 'reads': 0.68; 'chuck': 0.84; 'quickest': 0.84; 'hate': 0.91; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=DWCAtt9VBGmnKVeajwWlg70qyR3/lBbvBw3xVAHNfJo=; b=fzeUYlxh5SKoot0Ov0LGETV40PEXpChbjzU4Ma/46G8tGtuGqS3zH2wdihLI7Qik1x ehJbfnnG1QteO93/AmW0rTLgexttBrtt3j2xBF/Zwhog7axTNBxznG1WAAqHom11cvHP WEr3OcarEf6FtU7P5Al4iuXENf+Bsm2sNrKevGuoYbiAcisjIH5mNJS87jXzx3jxE5fU 9XMmdbQUyAEYhgsDXBiq5ZH2ZIX3wscqMY1+RnHR6gM2gebO4++/EAHSdv9crhrP0s5f J5D2y4tUBnvSZ1FthUlb0fKkDVxt9hYnVbriQ9a3H2upt+k8a/JOXnUDPl0KYhipcHEO o5EQ==
X-Received by 10.152.6.97 with SMTP id z1mr8410190laz.26.1376483706544; Wed, 14 Aug 2013 05:35:06 -0700 (PDT)
MIME-Version 1.0
Sender joshua.landau.ws@gmail.com
In-Reply-To <CAPTjJmq0256eGROAk+K6HL0fndbpWwZbs3POVHzzR+bYB1zu4g@mail.gmail.com>
References <mailman.451.1376187574.1251.python-list@python.org> <kue4u9$ja1$1@dont-email.me> <kue7n0$heh$1@ger.gmane.org> <mailman.555.1376438468.1251.python-list@python.org> <b704a4F85drU1@mid.individual.net> <CAN1F8qU8YEL3HgcOoUqiwA87=zM8=VHZCgJP6_x3hUEX7iCSvg@mail.gmail.com> <CAPTjJmq0256eGROAk+K6HL0fndbpWwZbs3POVHzzR+bYB1zu4g@mail.gmail.com>
From Joshua Landau <joshua@landau.ws>
Date Wed, 14 Aug 2013 13:34:26 +0100
X-Google-Sender-Auth 1DmrpUhVroVAZGesz6Bx4fXbAOk
Subject Re: Am I not seeing the Error?
To Chris Angelico <rosuav@gmail.com>
Content-Type text/plain; charset=UTF-8
Cc python-list <python-list@python.org>
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 <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.574.1376483714.1251.python-list@python.org> (permalink)
Lines 30
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1376483714 news.xs4all.nl 15991 [2001:888:2000:d::a6]:36397
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52511

Show key headers only | View raw


On 14 August 2013 13:07, Chris Angelico <rosuav@gmail.com> wrote:
> On Wed, Aug 14, 2013 at 7:59 AM, Joshua Landau <joshua@landau.ws> wrote:
>>
>> What's wrong with cat? Sure it's superfluous but what makes it *bad*?
>> Personally I often prefer the pipe "cat x | y" form to "x < y"... or
>> "< y x".
>
> What's the use of it, in that situation? Why not simply use
> redirection? (Though you have the letters backward; "cat y | x" would
> be the equivalent of your others. Typo, I assume.) You're forking a
> process that achieves nothing, if your cat has just one argument.
>
> Of course, there ARE many good uses for cat. If you give it multiple
> arguments, or if you have arguments that modify the output on the way
> through (eg "cat -n"), then it's not the same as redirection. And some
> programs behave differently if stdout is a tty, so the quickest way to
> get the porcelain version of something is to append "|cat" to the
> command. Or maybe you need to retrieve something that only root can
> read, so you use "sudo cat /x/y/z|somescript". But if you could spell
> it "x < y", then why not do so?

Because "cat y | x" often reads nicer. It's the whole "input ->
function -> function -> ... -> output" thing.

I especially hate "y < input > output" which reads awfully not matter
where you chuck the spaces. "cat input | y > output" however, is
acceptable.

Honestly I do think Python would do well to get a pipe operator,
because in some circumstances it's just cleaner.

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


Thread

Am I not seeing the Error? Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-08-10 22:19 -0400
  Re: Am I not seeing the Error? John Gordon <gordon@panix.com> - 2013-08-12 14:47 +0000
  Re: Am I not seeing the Error? Denis McMahon <denismfmcmahon@gmail.com> - 2013-08-13 20:28 +0000
    Re: Am I not seeing the Error? Dave Angel <davea@davea.name> - 2013-08-13 21:16 +0000
    Re: Am I not seeing the Error? MRAB <python@mrabarnett.plus.com> - 2013-08-14 00:44 +0100
    Re: Am I not seeing the Error? Ned Batchelder <ned@nedbatchelder.com> - 2013-08-13 20:00 -0400
      Re: Am I not seeing the Error? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-08-14 13:20 +1200
        Re: Am I not seeing the Error? Joshua Landau <joshua@landau.ws> - 2013-08-14 07:59 +0100
        Re: Am I not seeing the Error? Chris Angelico <rosuav@gmail.com> - 2013-08-14 13:07 +0100
          Re: Am I not seeing the Error? Roy Smith <roy@panix.com> - 2013-08-14 08:39 -0400
        Re: Am I not seeing the Error? Joshua Landau <joshua@landau.ws> - 2013-08-14 13:34 +0100

csiph-web