Re: minor problem in summary
"John J. Trammell" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.qotw.discuss |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Sep 12, 2004 at 06:20:31PM -0600, Andrew Dalke wrote:
>John J. Trammell:
>> At first, I couldn't get it to run, probably because I was running it
>> without any command-line options. The error message is:
>>
>> File "dalke.py", line 10
>> yield ")" * open_count
>> ^
>> SyntaxError: invalid syntax
>
> Ah, that means the Python version was too old and
> didn't the relatively new (about 2-3 year) keyword.
When I run it on my unstable machine (python v2.3.4), I get:
Traceback (most recent call last):
File "dalke.py", line 80, in ?
test()
File "dalke.py", line 29, in test
raise AssertionError("wrong for 0")
AssertionError: wrong for 0
:^(
>> This tidbit (new to me) from perlrun tells the rest:
>
>> If the #! line does not contain the word "perl", the program named
>> after the #! is executed instead of the Perl interpreter. This is
>> slightly bizarre,
>
> Yeah, that is slightly bizarre!
>
> I wonder how it got the right interpreter? Perhaps you
> added a #! line (wasn't in my submission) to something
> other than in your path? Or ran it on a different machine?
I'm pretty sure I added the shebang.
--
So, if you know how to use a hammer, every problem is just another
nail. Including the nail with the "neat spirals" down the side...
-- Richard Irving, on the NANOG list