David Lukeš added the comment:
This is unfortunate, especially since it used to work... Going forward, is the
intention not to support this use case? Or is it possible that support for
generic NamedTuples will be re-added in the future?
--
nosy: +dlukes
David Lukeš added the comment:
> You can use TemporaryDirectory.
That was actually the first approach I tried :) I even thought this could be
used to make `mktemp` safe -- just create the name in a `TemporaryDirectory`.
However, after reading through the mailing list thread, I realized t
David Lukeš added the comment:
> A secure `mktemp` could be as simple as ...
Though in practice, I'd rather be inclined to make the change in
`tempfile._RandomNameSequence`, so as to get the same behavior across the
entire module, instead of special-casing `mktemp`. As Guido va
New submission from David Lukeš :
I recently came across a non-testing use case for `tempfile.mktemp()` where I
struggle to find a viable alternative -- temporary named pipes (FIFOs):
```
import os
import tempfile
import subprocess as sp
fifo_path = tempfile.mktemp()
os.mkfifo(fifo_path
David Lukeš added the comment:
Any updates on this? Making Executor.map lazier would indeed be more consistent
and very useful, it would be a shame if the PR went to waste :) It's a feature
I keep wishing for in comparison with the older and process-only
multiprocessing API. And event
David Lukeš added the comment:
Oh, right, of course! Sorry and thanks for taking the time to clarify that :)
--
___
Python tracker
<https://bugs.python.org/issue33
New submission from David Lukeš :
""" \""" """ evaluates to ' """ ' (as expected), but without the surrounding
spaces, """\"""""" evaluates to '"' in
David Lukeš added the comment:
Perfect, thanks!
--
___
Python tracker
<https://bugs.python.org/issue32306>
___
___
Python-bugs-list mailing list
Unsubscribe:
David Lukeš added the comment:
Yes, sorry for not being quite clear the first time around :)
I eventually found out about Pool.imap (see item 3 on list in OP) and indeed it
fits my use case very nicely, but my point was that the documentation is
somewhat misleading with respect to the
David Lukeš added the comment:
Hi Antoine,
Thanks for the response! :) I think the problem lies in the line immediately
preceding the code you've posted:
```
fs = [self.submit(fn, *args) for args in zip(*iterables)]
```
In other words, all the jobs are first submitted and their fu
New submission from David Lukeš :
The docstring for `concurrent.futures.Executor.map` starts by stating that it
is "Equivalent to map(func, *iterables)". In the case of Python 3, I would
argue this is true only superficially: with `map`, the user expects
memory-efficient processing,
New submission from David Lukeš:
The following program makes Python 3.4.3 crash with a segmentation fault:
```
#!/usr/bin/env python3
import operator
N = 50
l = [0]
for i in range(N):
l = map(operator.add, l, [1])
print(list(l))
```
I suppose the problem is that there are too many
12 matches
Mail list logo