>
> Earlier on the thread, I made a similar point that it would be nice to
> have a way to filter without the redundant for x in x. Though I can’t think
> of a really good way to express it. But as for filtered for loops:
>
> "for thing in
> (x for x in collection if is_interesting(x))"
>
It's pre
On Wed, Mar 02, 2022 at 01:08:41AM +, Davis, Matthew via Python-ideas wrote:
> Hi,
>
> Currently shutil.copyfileobj returns nothing.
> I would like to be able to find out how many bytes were copied.
That seems reasonable to me. It would be a similar change to having
file.write() return the n
On Mon, 7 Mar 2022 at 09:33, Paul Moore wrote:
> > Do I care enough to write a PEP? No. So this, like many other small ideas,
> > will probably die on the vine.
>
> Yes, this is the real problem. It's simply not compelling enough, even
> for supporters of the idea, for them to do the necessary wo
On Sun, 6 Mar 2022 at 21:41, Christopher Barker wrote:
>
>
>> Personally, I'm certainly not ignoring comprehensions. "for thing in
>> (x for x in collection if is_interesting(x))" uses comprehensions just
>> fine, if you don't like the verbosity of "x for x in", then that's an
>> issue with compre
> Personally, I'm certainly not ignoring comprehensions. "for thing in
> (x for x in collection if is_interesting(x))" uses comprehensions just
> fine, if you don't like the verbosity of "x for x in", then that's an
> issue with comprehensions, not a reason why comprehensions don't
> address this i
Hi Barry,
I can’t use os.fstat. That only applies to real files, not file-like objects.
I’m using streams for downloading, unzipping, gzipping and uploading data which
is larger than my disk and memory. So it’s all file-like objects, not real
files.
A file-like object that just passes through d
> On Mar 6, 2022, at 5:05 AM, Barry Scott wrote:
>
>
>
>>> On 6 Mar 2022, at 07:19, t...@tomforb.es wrote:
>>>
>>> For reference, this request comes from running Dask[1] jobs. Dask handles
>>> retrying and tracking tasks across machines but if you're dealing with a
>>> batch of inputs that
On Sun, 6 Mar 2022 at 01:55, Christopher Barker wrote:
>
> On Sat, Mar 5, 2022 at 4:33 AM Paul Moore wrote:
>>
>> for thing in filter(is_interesting, this_collection):
>> ...
>>
>> That seems pretty non-clunky. Is the issue here that "filter" is not
>> sufficiently well-known? Or that you don
> On 6 Mar 2022, at 07:19, t...@tomforb.es wrote:
>
> For reference, this request comes from running Dask[1] jobs. Dask handles
> retrying and tracking tasks across machines but if you're dealing with a
> batch of inputs that reliably kills a worker it is really hard to debug,
> moreso if it
If anyone is interested, I had a play around with this and came up with a
pretty simple-ish implementation: https://github.com/orf/cpython/pull/1/files.
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas
10 matches
Mail list logo