On 2024-08-22 01:44:35 +0000, Kevin M. Wilson via Python-list wrote:
> break (Old_MacDonald:23 | name[indx] == 'd', indx = 4), based on the doc spec 
> in python.org (https://docs.python.org/3/library/pdb.html#debugger-commands)
> Cell In[1], line 20
>     break (Old_MacDonald:23 | name[indx] == 'd', indx = 4)
>           ^
>           SyntaxError: invalid syntax
> I got one blank white screen when I entered the exact first line of the 
> python.org-->b(reak) [([filename:]lineno | function) [, condition]]

You misunderstood the notation. The | means "or", it is not something
you have to type literally.

So the syntax is:
    either a line number (maybe in a different file) or a function name
    optionally followed by a condition after a comma

So in your case probably something like:

    break Old_MacDonald:23, name[indx] == 'd'

(I'm not sure what "indx = 4" was supposed to do. You can't assign
inside of a condition.)

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | h...@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to