On Sun, Jun 05, 2022 at 07:03:32AM +1000, Chris Angelico wrote:
> How is redundancy fundamentally good,
I don't know, you will have to ask somebody who is arguing that
"redundancy is fundamentally good", which is not me. Redundancy can be
either good or bad.
https://www.informationweek.com/gov
On 02Jun2022 19:26, Kevin wrote:
>I might be posting this prematurely, but I had an idea and wanted to float it.
>Also, I'm new here so hopefully this is appropriate.
>
>How about augmenting slicing with an additional parameter 'size' (name chosen
>to achieve alliteration; 'start', 'stop', 'ste
On Sun, 5 Jun 2022 at 05:42, Steven D'Aprano wrote:
> > Obviously sometimes it's unavoidable, but I don't think we can
> > genuinely accept that the redundancy is *good*.
>
> You have convinced me! I'm now removing all my RAID devices!
>
> *wink*
>
> Would it have helped if I had said redundancy i
On Sat, Jun 04, 2022 at 11:16:18PM +1000, Chris Angelico wrote:
> > Redundancy is good:
> >
> > # Obviously, clearly wrong:
> > spam, eggs, cheese = islice(myvalues, 5)
>
> Yes but which part is wrong?
You're a professional programmer, so I am confident that you know the
answer to that
On Sat, 4 Jun 2022 at 22:16, Steven D'Aprano wrote:
>
>
> On Sat, Jun 04, 2022 at 10:04:39AM -, Steve Jorgensen wrote:
>
> > OK. That's not terrible. It is a redundancy though, having to re-state
> > the count of variables that are to be de-structured into on the left.
>
> Redundancy is good:
On Sat, Jun 04, 2022 at 10:04:39AM -, Steve Jorgensen wrote:
> OK. That's not terrible. It is a redundancy though, having to re-state
> the count of variables that are to be de-structured into on the left.
Redundancy is good:
# Obviously, clearly wrong:
spam, eggs, cheese = islice
OK. That's not terrible. It is a redundancy though, having to re-state the
count of variables that are to be de-structured into on the left.
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@pytho
On Sat, 4 Jun 2022 at 09:39, Steve Jorgensen wrote:
>
> I was using the reading of lines from a file as a contrived example. There
> are many other possible cases such as de-structuring from iterator such as
> `itertools.repeat()` with no `count` argument which will generate values
> endlessly.
I was using the reading of lines from a file as a contrived example. There are
many other possible cases such as de-structuring from iterator such as
`itertools.repeat()` with no `count` argument which will generate values
endlessly.
___
Python-ideas m
On Sat, Jun 04, 2022 at 07:31:58AM -, Steve Jorgensen wrote:
> A contrived use case:
>
> with open('document.txt', 'r') as io:
> (line1, line2, *) = io
>
with open('document.txt', 'r') as io:
line1 = io.readline()
line2 = io.readline()
It would be lovely if
A contrived use case:
with open('document.txt', 'r') as io:
(line1, line2, *) = io
It is possible to kind of achieve the same result using `*_` except that would
actually read all the lines from the file, even if we only want the first 2.
…so I am suggesting that we use the bare `*`
11 matches
Mail list logo