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.
|_|_) | |
| | |
hjp@hjp.at | -- Charles Stross, "Creative writing
__/ |
http://www.hjp.at/ | challenge!"
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmbG1ekACgkQ8g5IURL+ KF0aEA//d0QN59PTIs5JbHPyLXnpEEJx1bvtJhjkNSbv/feLGWJGqH2c4TILjJxA jCL9Wda52d8ZBIdsW96Mtiq9IEZfOe3iBeMREfos6SJGBbvPdADm8zqb1yAGBApT spxAYkRHkOdb3hXHTu0NcdaDs57iO8D1fBzpXUdgLj71KK/flbS+nWB9ZFyI+QfP qg6R7rUYmTTifWra8FM/c6k9Bfd2ojk2X5EWoOKehSNniEBerJlw4S1w5yalMotz G5iqCpekfTLQl/EYYvK/ngejAebJcJnNmHetnEKLuMoyavepOl3EImugV7GGHAwg 0SCcDL0zPoQPAjfLE65JS495wmOnJ/kU4cnWK+lPcL0HeFg5jXBYseg2sTBr3GFe 4Op5cp3n6W/al75xc2yI5rsX40S3AcKggmamyuCkgGdVUXmnCwRlIEsMpSFNk7nI 3GKXs5ZGodveKcemhNax7cxPQ7aiDa2XdujH0qmFz5q4cg6dfnetS4RVI53WV4LN rHkmlM2TUjVaMRDFYMOymeKRtfraZWV9hxXrXuWMjPaG2okvd3aI0KzTcUtugzDA K5k20rq5dvhzZtfJcgVvQhjD/AQzrMd3cCKIysOQ3ZbPDvc8z0J49zeQNH9LykoB FltQpCLH1/oT4+H/bzrX8CuLidYXrBVAGIFhDvb