From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22159 invoked from network); 4 Aug 2023 21:31:12 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 4 Aug 2023 21:31:12 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 99646426B2; Sat, 5 Aug 2023 07:31:06 +1000 (AEST) Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by minnie.tuhs.org (Postfix) with ESMTPS id B65FA426B2 for ; Sat, 5 Aug 2023 07:30:59 +1000 (AEST) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b9338e4695so41287131fa.2 for ; Fri, 04 Aug 2023 14:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691184657; x=1691789457; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=R0UGXflcbOGLzGUdqdtTkl8a0hL8XAFR1gITcr4zpgA=; b=Eek7Fx63d352+gJVoxQWXEmXt5AcS9ujpehW8RqQFmStmJ0oyHprobprjXpAlYVU5a WjLhAX7T3bhudemhXQrNLmUMJzK1G83DCWsD3aYsXWA+Ivr2tWu+MGfNByM5X5l55aa5 Nc3/2udGxukqMlwKXfx7DU1MDswzkk2TnOdZhMYzFo4+KiEyUxBLSagp3yLuqiOksroR ZM95c0vewYEMdE3LIjmN6gyZV0BbXJPIGdM6ePyPmjcOyI29xttyJieoZB90+UJ+jUx0 rOVDSTIUXTF2Yc9+xO3uz0gfo6wL6PUq1jwFwDvAQrnm+KcAgyZaFSXnaQaanI4vjil0 sAbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691184657; x=1691789457; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R0UGXflcbOGLzGUdqdtTkl8a0hL8XAFR1gITcr4zpgA=; b=MKInC1WCefp8/Y2+oWS2IkW2qLub9JAB2RPQcwhesp/XLeAAxUXtvvRI3dX0DeTagc HW8tZDYIK+l5PYXl8cBra6pmLp7wZWQihomjFaP/fTYwGQqh22zDtEHj7S0F+qlFHEEd tNko8OteHE7L7VccXGngzU1Kmf0M7zsZSS5R19W5WXHv276GMIiJ1R89A1SyUG7XjQq0 pnu9eoMdGLsIDHBI4+o00e3f/JgoVLQbnHnWh+jbJkiEJPc5mNMYl3hrYLsv6OAYgDQ8 NdYzXrfWVyCJIAOFJGTCmbSdF7fnocL+PuNLDiIRy3+vfz2TEPvRpnqNPlRdI14zRLVR pxJw== X-Gm-Message-State: AOJu0YyXgVb2DLjMGIXghKl0GRkzNbCY3wo7OlZu8kCTciOXqqjfhkO5 4xEdh5SMM9rSPzB3xUvguzKrrMzrNS95FlNI7gI= X-Google-Smtp-Source: AGHT+IGtW6qRtCK4F00mlhakowGryaWX1VeBiA9/675nSkkN4xV6AmJRMocGrVGvLVgvbFKe0pDYlhR4vdrjVJlNmbo= X-Received: by 2002:a2e:968d:0:b0:2b6:c528:4940 with SMTP id q13-20020a2e968d000000b002b6c5284940mr2556588lji.3.1691184657322; Fri, 04 Aug 2023 14:30:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dan Cross Date: Fri, 4 Aug 2023 17:30:21 -0400 Message-ID: To: Douglas McIlroy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: LTZL2KF35QNIKYILKM3HOIJ34GKZZCJK X-Message-ID-Hash: LTZL2KF35QNIKYILKM3HOIJ34GKZZCJK X-MailFrom: crossd@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: TUHS main list X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: python List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, Aug 4, 2023 at 5:17=E2=80=AFPM Douglas McIlroy wrote: > > Most of the time I'd rather not have to care whether the thing > > I'm printing is a string, or a pointer, or an integer, or whatever: > > I just want to see its value. > > > Go has %v for exactly this. It's very nice for debugging. > > Why so verbose? In Basic, PRINT required no formatting directives at all. There is a form in Go that doesn't require the "%v"s. : chandra; cat v.go package main import "fmt" func main() { fmt.Println("Hi", "there", "world", "pi is close to", 3.14159) } : chandra; go run v.go Hi there world pi is close to 3.14159 : chandra; I believe that `%v` exists so that one can compose it with other formatting directives of various kinds; perhaps one wants to print the string representation of an object with no additional ceremony, but wants to emit a number in some specific format. - Dan C.