Re: Python

"Peter J. Holzer" <[email protected]> Sun, 21 Dec 2025 17:11:26 +0100
Newsgroups gmane.comp.python.general
Message-ID <f7jqkoxpofmwophxjkigdx4wf6j5kgglinkcpobpuknarg77gl@va2tmjygezir>
On 2025-12-21 23:59:48 +1100, Chris Angelico via Python-list wrote:
> On Sun, 21 Dec 2025 at 23:31, Peter J. Holzer <[email protected]> wrote:
> > There is the concept of "pythonic" Code (just like there is a concept of
> > idiomatic code in (almost) any language), but if you ask 100 randomly
> > chosen Python programmers whether the use of += is pythonic, I doubt
> > that more than a handful would say no.
> >
> 
> I would expect the opposite. It's in the language for a reason. Is it
> somehow more Pythonic to repeat yourself?

I think we agree, but my double negative may have been confusing.

My expectation is:

at most 5% say "no, using += is not pythonic"
at least 95% say "yes, using += is pythonic"

        hjp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | [email protected]         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmlIHCUACgkQ8g5IURL+
KF0Qhw/9EJsruoCUt7Dce4+cDY6JjHWHbhiLMX84n1Lbm7HnxfB9KpiNK4PTIFd0
2hymOOYnukie06wL5UCY4Jvo8dxFmtfDR/xsYNdrNc0Jo4fG1zVeiu6VIvApUVSK
A39U0d7Lzhyx8ZjV48QS8GMshil3Du+NKgl7nGKAW3u+n9gqc3l3uF0Vgd8mYwke
wElPGNjaRmz3zb2WwCHPMe12xhFK1uQEmgw15QFXjGTVgHqOp8tsHke1OqxAtDGE
MwC956TDkPQV1+mMcD0y0KUUn0ZAJAJufSXNzLl0DU33YrCMyCuqbEF3dU/SrNKh
8lpkT78Hn2VrecLgVFoKIc3WvF7RXS+cH8+wQ200nDh2yQuvNKGCp+s4Tjp40rPE
BrRRkhOh7sHj9blGYqcpaFvJCjlf2Q8dybvCKQ4+lUt5orftCiCP7OABOpZFC/AA
ZzBsL8658M/06Uq+q+Nzw16hJD9mzXC0n3nQusExviZ67nRkqqdduTxKiBLV8Ql9
5KkHoJIxQnplwM+hKw90Z6Qo86qHIe2otNk2TqbrNKiomgR/3WyHfFdPzBVDzbpU
YB5VxZJgHizdF/6HZ7n0MGPprdzpy7EJpCv5f0lW0x4C9+rWA9+T9PF7m0Rr4uEI
q685JcVqxd4r8AVlUrkwHrZ85CZfQiZJFhXMGFG+d8gxH822Vvc=
=AM97
-----END PGP SIGNATURE-----