Skip to content

Commit 2ed8903

Browse files
committed
Don't use numeric references.
1 parent 0a64b07 commit 2ed8903

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

pep-0553.rst

+24-16
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ enter the debugger. However this idiom has several disadvantages.
3939
debugging options, say if you're using an IDE or some other development
4040
environment.
4141

42-
* Python linters (e.g. flake8 [1]_) complain about this line because it
42+
* Python linters (e.g. flake8 [linters]_) complain about this line because it
4343
contains two statements. Breaking the idiom up into two lines further
4444
complicates the use of the debugger,
4545

@@ -50,7 +50,7 @@ other languages, and utilizing a convention that already exists in Python.
5050
Proposal
5151
========
5252

53-
The JavaScript language provides a ``debugger`` statement [2]_ which enters
53+
The JavaScript language provides a ``debugger`` statement [java]_ which enters
5454
the debugger at the point where the statement appears.
5555

5656
This PEP proposes a new built-in function called ``breakpoint()``
@@ -70,7 +70,7 @@ and it can be set to a different function to change the debugger that
7070
default value of ``sys.breakpointhook()`` to make it easy to reset.
7171
This exactly models the existing ``sys.displayhook()`` /
7272
``sys.__displayhook__`` and ``sys.excepthook()`` /
73-
``sys.__excepthook__`` hooks [3]_.
73+
``sys.__excepthook__`` [hooks]_.
7474

7575
The signature of the built-in is ``breakpoint(*args, **kws)``. The positional
7676
and keyword arguments are passed straight through to ``sys.breakpointhook()``
@@ -100,7 +100,7 @@ can have various values:
100100
value may be a string with no dots, in which case it names a built-in
101101
callable, e.g. ``PYTHONBREAKPOINT=int``. (Guido has expressed the
102102
preference for normal Python dotted-paths, not setuptools-style entry point
103-
syntax [4]_ .)
103+
syntax [syntax]_.)
104104

105105
This environment variable allows external processes to control how breakpoints
106106
are handled. Some uses cases include:
@@ -147,7 +147,7 @@ Evaluation of $PYTHONBREAKPOINT
147147
There has been some mailing list discussion around this topic. The basic
148148
behavior as described above does not appear to be controversial. Guido has
149149
expressed a preference for ``$PYTHONBREAKPOINT`` consultation happening in
150-
the default implementation of ``sys.breakpointhook``.
150+
the default implementation of ``sys.breakpointhook`` [envar]_.
151151

152152
The one point of discussion relates to whether the value of
153153
``$PYTHONBREAKPOINT`` should be loaded on interpreter start, and whether its
@@ -157,11 +157,11 @@ It is the PEP author's opinion that the environment variable need only be
157157
looked up at the time of use. It is also the author's opinion that the value
158158
of the environment variable can be accessed each time ``sys.breakpointhook``
159159
is run, to allow for maximum functional flexibility. Because this feature
160-
enters the debugger, any performance improvements for caching is negligible
161-
and does not outweigh the flexibility. Further, because the special case of
162-
``PYTHONBREAKPOINT=0`` is fast-tracked, the no-op code path is quite fast, and
163-
should be in the noise given the function calls of ``breakpoint()`` ->
164-
``sys.breakpointhook()``.
160+
enters the debugger, any performance improvements for caching will be
161+
negligible and do not outweigh the flexibility. Further, because the special
162+
case of ``PYTHONBREAKPOINT=0`` is fast-tracked, the no-op code path is quite
163+
fast, and should be in the noise given the function calls of ``breakpoint()``
164+
-> ``sys.breakpointhook()``.
165165

166166

167167
Breakpoint bytecode
@@ -191,7 +191,7 @@ it as handy as ``breakpoint.pm()``.
191191
Implementation
192192
==============
193193

194-
A pull request exists with the proposed implementation [5]_.
194+
A pull request exists with the proposed implementation [impl]_.
195195

196196

197197
Rejected alternatives
@@ -243,15 +243,23 @@ Version History
243243
References
244244
==========
245245

246-
.. [1] http://flake8.readthedocs.io/en/latest/
246+
.. [linters]
247+
http://flake8.readthedocs.io/en/latest/
247248
248-
.. [2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger
249+
.. [java]
250+
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger
249251
250-
.. [3] https://docs.python.org/3/library/sys.html#sys.displayhook
252+
.. [hooks]
253+
https://docs.python.org/3/library/sys.html#sys.displayhook
251254
252-
.. [4] http://setuptools.readthedocs.io/en/latest/setuptools.html?highlight=console#automatic-script-creation
255+
.. [syntax]
256+
http://setuptools.readthedocs.io/en/latest/setuptools.html?highlight=console#automatic-script-creation
253257
254-
.. [5] https://github.com/python/cpython/pull/3355
258+
.. [impl]
259+
https://github.com/python/cpython/pull/3355
260+
261+
.. [envar]
262+
https://mail.python.org/pipermail/python-dev/2017-September/149447.html
255263
256264
257265
Copyright

0 commit comments

Comments
 (0)