On Fri, 8 Jan 2021 at 22:25, Greg Ewing wrote:
>
> On 9/01/21 10:19 am, Ram Rachum wrote:
> > In short, I want `reversed(itertools.chain(x, y, z))` that behaves like
> > `itertools.chain(map(reversed, (z, y, x)))`.
>
> I think you mean `itertools.chain(*map(reversed, (z, y, x)))`
>
> You can get t
On Sat, 9 Jan 2021 at 13:29, Oscar Benjamin wrote:
> The argument to reversed either needs to be a sequence with __len__
> and __getitem__ or an object with a __reversed__ method that returns
> an iterator. The arguments to chain have to be iterables. Every
> sequence is an iterable so there is a
In case someone is interested, I created a corresponding pull request here:
https://github.com/python/cpython/pull/23900
It's a lightweight change since the relevant methods `TestCase.debug` and
`TestSuite.debug` were already in place. The docstring of these methods makes
it clear that this is w
On Sun, Jan 10, 2021 at 12:29 AM Oscar Benjamin
wrote:
> I haven't ever wanted to reverse a chain but I have wanted to be able
> to reverse an enumerate many times:
>
> >>> reversed(enumerate([1, 2, 3]))
> ...
> TypeError
>
> The alternative zip(range(len(obj)-1, -1, -1), reversed(obj)
Joseph Martinot-Lagarde writes:
> One remark about this : .tar.gz files are the exception rather than
> the rule, and AFAIK maybe the only one ?
Not really. stem.ext -> stem.ext.zzz where zzz is a compression
extension is a pretty common naming convention. For me ext == 'tar'
is by far the mo
On Sun, Jan 10, 2021 at 4:51 AM Stephen J. Turnbull
wrote:
>
> Joseph Martinot-Lagarde writes:
>
> > One remark about this : .tar.gz files are the exception rather than
> > the rule, and AFAIK maybe the only one ?
>
> Not really. stem.ext -> stem.ext.zzz where zzz is a compression
> extension i
On 2021-01-10 at 05:03:08 +1100,
Chris Angelico wrote:
> On Sun, Jan 10, 2021 at 4:51 AM Stephen J. Turnbull
> wrote:
> >
> > Joseph Martinot-Lagarde writes:
> >
> > > One remark about this : .tar.gz files are the exception rather than
> > > the rule, and AFAIK maybe the only one ?
> >
> > Not
On my system:
% find ~ -name '*.*.*' | rev | cut -d. -f-2 | rev | sort | uniq -c | sort
-nr | head -30
17278 d.ts
11314 js.map
6600 symbolic.png
4041 png.i
3968 cpython-37.pyc
2656 yarn-metadata.json
2614 yarn-tarball.tgz
2575 c.i
2526 csv.gz
1727 h.i
1659 opt-1.pyc
For my entire filesystem:
124920 cpython-38.pyc
50034 html.gz
31158 cpython-39.pyc
31032 d.ts
30415 cpython-37.pyc
21473 cpython-36.pyc
19000 js.map
9888 symbolic.png
5086 cpython-35.pyc
5004 1.gz
4657 cpython-38-x86_64-linux-gnu.so
4261 pypy36.pyc
4152 Debian.gz