On 2024-07-06 at 11:49:06 +0100,
Rob Cliffe via Python-list wrote:
> Is there a better / more Pythonic solution?
https://docs.python.org/3/library/fileinput.html
At least this attempts to abstract the problem of iterating over a file
(or multiple files) into a library routine. I've used it a
On 2024-05-29 at 11:39:14 -0700,
HenHanna via Python-list wrote:
> On 5/27/2024 1:59 PM, 2qdxy4rzwzuui...@potatochowder.com wrote:
> > https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule
[...]
> Are the Rules 1--9 by Greenspun good too?
I don't know; let me look it up. Oh, there it
On 2024-05-29 at 17:14:51 +1000,
Chris Angelico via Python-list wrote:
> I wouldn't replace str.format() everywhere, nor would I replace
> percent encoding everywhere - but in this case, I think Thomas is
> correct. Not because it's 2024 (f-strings were brought in back in
> 2015, so they're
On 2024-05-27 at 12:37:01 -0700,
HenHanna via Python-list wrote:
>
> On 5/27/2024 7:18 AM, Cor wrote:
> > Some entity, AKA "B. Pym" ,
> > wrote this mindboggling stuff:
> > (selectively-snipped-or-not-p)
> >
> > > On 12/16/2023, c...@clsnet.nl wrote:
> > >
> > > > Any marginally usable
On 2024-05-19 at 18:13:23 +,
Gilmeh Serda via Python-list wrote:
> Was there a reason they chose the name Pip?
Package Installer for Python
https://pip.pypa.io/en/stable/index.html
--
https://mail.python.org/mailman/listinfo/python-list
On 2024-05-19 at 18:13:23 +,
Gilmeh Serda via Python-list wrote:
> Was there a reason they chose the name Pip?
Package Installer for Python
https://pip.pypa.io/en/stable/index.html
Every time I see PIP, I think Peripheral Interchange Program, but I'm
old.
--
On 2024-05-03 at 10:56:39 -0300,
Johanne Fairchild via Python-list wrote:
> How to discover what values produced an exception? Or perhaps---why
> doesn't the Python traceback show the values involved in the TypeError?
> For instance:
>
>
On 2024-03-20 at 09:49:54 +0100,
Roel Schroeven via Python-list wrote:
> You haven't only checked for None! You have rejected *every* falsish value,
> even though they may very well be acceptable values.
OTOH, only you can answer these questions about your situations.
Every application, every
On 2024-03-15 at 15:48:17 -0400,
Thomas Passin via Python-list wrote:
> [...] And I suppose there is always the possibility that sometime in
> the future an "or" clause like that will be changed to return a
> Boolean, which one would expect anyway.
Not only is the current value is way more
On 2024-01-13 at 11:34:29 +0100,
Left Right wrote:
> > The Python term, at least colloquially, is "tuple unpacking."
That quote is from me. Please do preserve attributions.
> Well, why use colloquialism if there's a language specification? Also,
> there weren't any tuples used in my example,
On 2024-01-13 at 02:02:39 +0100,
Left Right via Python-list wrote:
> Actually, after some Web search. I think, based on this:
> https://docs.python.org/3/reference/simple_stmts.html#grammar-token-python-grammar-augtarget
> that in Python you call this "augmented assignment target". The term
>
On 2023-12-06 at 09:32:02 +,
Chris Green via Python-list wrote:
> Thomas Passin wrote:
[...]
> > Just go with an .ini file. Simple, well-supported by the standard
> > library. And it gives you key/value pairs.
> >
> My requirement is *slightly* more complex than just key value pairs,
>
On 2023-11-29 at 21:44:01 -0300,
Julieta Shem via Python-list wrote:
> How would you write this procedure?
>
> --8<---cut here---start->8---
> def powers_of_2_in(n):
> s = 0
> while "I still find factors of 2 in n...":
> q, r = divmod(n, 2)
> if r
On 2023-11-11 at 23:44:19 +,
Y Y via Python-list wrote:
> I am curious and humble to ask: What is the purpose of a BEEP?
It's a simple way for a terminal-based program to alert (hence '\a') a
user or an operator that their attention is requested or required.
See also
On 2023-09-15 at 10:49:10 +,
scruel tao via Python-list wrote:
> ```python
> >>> class A:
> ... def __init__(self):
> ... pass
> ...
> >>> A.__init__
>
> >>> a = A()
> >>> a.__init__
> >
> ```
>
> On many books and even the official documents, it seems that many authors
> prefer to
On 2023-07-22 at 11:04:35 +,
Vinay Sajip via Python-list wrote:
> What Changed?
> =
What changed, indeed.
Maybe I'm old, and curmudgeonly, but it would be nice if the body of
these annoucement emails (not just this one) contained the name of the
program and a one-line summary
16 matches
Mail list logo