Deutsch   English   Français   Italiano  
<mailman.63.1724307318.2890.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: "Peter J. Holzer" <hjp-python@hjp.at>
Newsgroups: comp.lang.python
Subject: Re: pdb: How to use the 'break' parameter?
Date: Thu, 22 Aug 2024 08:08:46 +0200
Lines: 60
Message-ID: <mailman.63.1724307318.2890.python-list@python.org>
References: <1213218119.10733806.1724291075830.ref@mail.yahoo.com>
 <1213218119.10733806.1724291075830@mail.yahoo.com>
 <20240822060846.hojhyg25dql25ziu@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="e5iev4uv6jfpewj6"
X-Trace: news.uni-berlin.de JZ2DhoQWnqBZNxtNeHzgqg8TrDIqdysWWtTskfQNiSZw==
Cancel-Lock: sha1:NaAWzAy80Cg6nC+lC5areXbJm3w= sha256:jftrmEk5/f1RRbIvupslp2pcEktTbC4Rkx1yx9nGnaM=
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
 dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'content-
 type:multipart/signed': 0.05; 'blank': 0.09; 'content-
 type:application/pgp-signature': 0.09; 'filename:fname piece:asc':
 0.09; 'filename:fname piece:signature': 0.09;
 'filename:fname:signature.asc': 0.09; 'syntax': 0.15; '"creative':
 0.16; "'d',": 0.16; "(i'm": 0.16; '__/': 0.16; 'challenge!"':
 0.16; 'doc': 0.16; 'from:addr:hjp-python': 0.16;
 'from:addr:hjp.at': 0.16; 'from:name:peter j. holzer': 0.16;
 'hjp@hjp.at': 0.16; 'holzer': 0.16; 'reality.': 0.16; 'spec':
 0.16; 'stross,': 0.16; 'subject:parameter': 0.16; 'syntaxerror:':
 0.16; 'url-ip:212.17.106/24': 0.16; 'url-ip:212.17/16': 0.16;
 'url:hjp': 0.16; '|_|_)': 0.16; 'wrote:': 0.16; 'probably': 0.17;
 "can't": 0.17; 'to:addr:python-list': 0.20; 'subject:How': 0.23;
 'function': 0.27; 'sense': 0.28; 'do.': 0.32; 'python-list': 0.32;
 'white': 0.32; 'header:In-Reply-To:1': 0.34; 'invalid': 0.35;
 'cell': 0.36; 'means': 0.38; 'break': 0.39; 'exact': 0.40;
 'something': 0.40; 'skip:o 10': 0.61; 'received:212': 0.62;
 'your': 0.64; 'received:userid': 0.66; '8bit%:7': 0.67; 'url-
 ip:212/8': 0.69; 'charset:iso-8859-1': 0.73; 'supposed': 0.76;
 '"or",': 0.84; 'entered': 0.84; 'received:at': 0.84; 'skip:p 60':
 0.93
Mail-Followup-To: python-list@python.org
Content-Disposition: inline
In-Reply-To: <1213218119.10733806.1724291075830@mail.yahoo.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
 <python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
 <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
 <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20240822060846.hojhyg25dql25ziu@hjp.at>
X-Mailman-Original-References: <1213218119.10733806.1724291075830.ref@mail.yahoo.com>
 <1213218119.10733806.1724291075830@mail.yahoo.com>
Bytes: 5693


--e5iev4uv6jfpewj6
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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

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] =3D=3D 'd'

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

        hp

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

--e5iev4uv6jfpewj6
Content-Type: application/pgp-signature; name="signature.asc"

-----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/bzrX8CuLidYXrBVAGIFhDvbI83F3a84Byw4=
=voIR
-----END PGP SIGNATURE-----

--e5iev4uv6jfpewj6--