Phillip M. Feldman added the comment:
I'd forgotten about ''.join; this is a good solution. I withdraw my
comment.
On Mon, Sep 7, 2020 at 3:25 PM Steven D'Aprano
wrote:
>
> Steven D'Aprano added the comment:
>
> Marco, sum should be as fast as possible, so we don't want t
New submission from Phillip M. Feldman :
I'm not sure whether this is a bug or a feature request, but it seems as though
the following should produce the same result:
In [1]: 'a' + 'b' + 'c'
Out[1]: 'abc'
In [2]: sum(('a', 'b', 'c'))
TypeError Traceback (most recent call last)
in
> 1
Phillip M. Feldman added the comment:
'Should include "_ssl" somewhere in the message?' Exactly so. If a given
import statement imports 30 items, it would be helpful to know which one
caused the hickup. Thanks!
On Wed, Mar 13, 2019 at 12:28 PM Steve Dower wrote:
>
> St
Phillip M. Feldman added the comment:
Hello Steve,
I'm buying only 50 percent of this. The Python interpreter must know what
module it was trying to import, and can at least be able to report that.
Phillip
On Tue, Mar 12, 2019 at 8:42 AM Steve Dower wrote:
>
> Steve Dower
New submission from Phillip M. Feldman :
I have a module that contains an import statement that imports a large number
of items. This import was failing with the following error message:
ImportError: DLL load failed: The specified module could not be found.
The message would be so much more
Phillip M. Feldman added the comment:
My apologies for the tone of my remark. I am grateful to you and others
who donate their time to develop the code.
I'm attaching the wrapper code that I created to work around the problem.
Phillip
def expander(paths='./*'):
""&qu
Phillip M. Feldman added the comment:
It appears that the `importlib` package has the same issue: One can't
provide an iterator for the path. When searching a large folder tree for
an item that is likely to be found early in the search process (i.e., at a
high level in the folder tree
New submission from Phillip M. Feldman :
`imp.find_module` goes down in flames if one tries to pass an iterator rather
than a list of folders. Firstly, the message that it produces is somewhat
misleading:
RuntimeError: sys.path must be a list of directory names
Secondly, it would
Phillip M. Feldman added the comment:
That works. Thanks!
I think that this boils down to a documentation issue. The following says
that the default behavior is to line-wrap the help messages. At least to
me, this doesn't imply that whitespace is getting eaten.
RawDescriptionHelpFormatter
New submission from Phillip M. Feldman :
With `argparse`, I'm providing a triple-quoted string via the `description`
argument of the constructor. When I invoke the script with the -h or --help
argument, all formatting in the triple-quoted string is lost, i.e., all
paragraphs are run
Phillip M. Feldman phillip.m.feld...@gmail.com added the comment:
Hello Steven,
I'm embarrassed to report that I can't reproduce the problem. The
input line is parsed correctly if I enclose the string 'Demo IO' in
double quotes. It is parsed incorrectly if I enclose it in single
quotes
Phillip M. Feldman phillip.m.feld...@gmail.com added the comment:
I'm beginning to understand the reasoning. This is quite a bit more complex
than I initially thought, and I appreciate the explanations.
Phillip
On Sun, Oct 16, 2011 at 10:53 PM, Raymond Hettinger
rep...@bugs.python.orgwrote
Phillip M. Feldman phillip.m.feld...@gmail.com added the comment:
Hello Martin,
This is a fine example of the so-called is-ought controversy. The error
message is indeed telling me exactly what the problem is, but the underlying
problem is that this scheme was poorly thought out. Clearly
Phillip M. Feldman phillip.m.feld...@gmail.com added the comment:
Hello Mark,
This is a fair question. Suppose that I have three boxes with capacity
limits of 3, 2, and 1, and that there are three balls in total. Two of the
possible distributions are the following:
2, 0, 1
2, 1, 0
Capacity
Phillip M. Feldman phillip.m.feld...@gmail.com added the comment:
Here's an example of a problem from an entirely different domain:
An error control coding scheme can correct up to 3 errors in the header of a
packet and up to one error in the body of a packet. A given message is
divided
Phillip M. Feldman phillip.m.feld...@gmail.com added the comment:
I eventually determined that a call to `subprocess.Popen` was responsible
for the message, but could have determined this much more quickly if the
message had included the name of the file that could not be opened
(executed
Phillip M. Feldman phillip.m.feld...@gmail.com added the comment:
Why was this removed?
On Mon, Dec 20, 2010 at 8:30 PM, Alexander Belopolsky
rep...@bugs.python.org wrote:
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
Removed file: http://bugs.python.org/file20125
Phillip M. Feldman phillip.m.feld...@gmail.com added the comment:
I would like to unsubscribe from this thread, but haven't been able to
figure out how to do it.
Phillip
On Mon, Nov 22, 2010 at 11:50 PM, Georg Brandl rep...@bugs.python.orgwrote:
Georg Brandl ge...@python.org added
Phillip M. Feldman pfeld...@verizon.net added the comment:
As a temporary workaround, you can use the `wrap` function in my strnum
module (http://pypi.python.org/pypi/strnum/2.4).
Phillip
--
nosy: +pfeld...@verizon.net
___
Python tracker rep
New submission from Phillip M. Feldman pfeld...@verizon.net:
It appears that there is currently no way to import from a file whose
name contains a hyphen or blank. This makes it difficult to encode a
version number or date in the file name. The solution that I favor
would be to allow the name
Phillip M. Feldman pfeld...@verizon.net added the comment:
The current behavior of optparse is contrary to how most of Python
works. optparse should throw a named exception that can be trapped and
identified by the calling program. Doing a SystemExit is unacceptable.
I can't believe
Phillip M. Feldman pfeld...@verizon.net added the comment:
Thanks for the response!
I can indeed catch SystemExit, but I would like to be able to take one
action (terminate the program) if the user supplied an unknown option,
and another action (prompt for a new value) if the user supplied
New submission from Phillip M. Feldman pfeld...@verizon.net:
As per the Python documentation, the following regular expression should
produce a list containing the strings '6.7', 7.33', and '9':
re.findall('(-?\d+[.]\d+)|(-?\d+[.]?)|(-?[.]\d+)', 'asdf6.77.33ff9')
Instead, it generates
Phillip M. Feldman pfeld...@verizon.net added the comment:
You are right-- the documentation does say this, although it took me a
while to understand what it means. Thanks!
It seems as though there's a flaw in the design here, because there
should be some mechanism for grouping elements
New submission from Phillip M. Feldman pfeld...@verizon.net:
The online documentation describes functions cmath.phase and
cmath.polar, but when I try to import these, I get cannot import name
errors.
--
assignee: georg.brandl
components: Documentation
messages: 91330
nosy: georg.brandl
25 matches
Mail list logo