Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(161370)

#22619: Possible implementation of negative limit for traceback functions

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 1 month ago by waultah+py
Modified:
4 years, 7 months ago
Reviewers:
storchaka, georg, francismb, berker.peksag
CC:
terry.reedy, rbcollins, r.david.murray, devnull_psf.upfronthosting.co.za, storchaka, vlth, vaultah
Visibility:
Public.

Patch Set 1 #

Total comments: 4

Patch Set 2 #

Total comments: 7

Patch Set 3 #

Patch Set 4 #

Patch Set 5 #

Patch Set 6 #

Patch Set 7 #

Patch Set 8 #

Total comments: 7

Patch Set 9 #

Patch Set 10 #

Total comments: 6

Patch Set 11 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/traceback.rst View 1 2 3 4 5 6 7 8 9 10 4 chunks +28 lines, -17 lines 0 comments Download

Messages

Total messages: 8
storchaka_gmail.com
http://bugs.python.org/review/22619/diff/13050/Lib/traceback.py File Lib/traceback.py (right): http://bugs.python.org/review/22619/diff/13050/Lib/traceback.py#newcode60 Lib/traceback.py:60: yield from seq[limit:] Needed "return" statement after "yield from". ...
5 years, 1 month ago #1
jsbfox_gmail.com
http://bugs.python.org/review/22619/diff/13050/Lib/traceback.py File Lib/traceback.py (right): http://bugs.python.org/review/22619/diff/13050/Lib/traceback.py#newcode60 Lib/traceback.py:60: yield from seq[limit:] On 2014/10/12 19:13:07, storchaka wrote: > ...
5 years, 1 month ago #2
Georg
http://bugs.python.org/review/22619/diff/13056/Lib/traceback.py File Lib/traceback.py (right): http://bugs.python.org/review/22619/diff/13056/Lib/traceback.py#newcode57 Lib/traceback.py:57: cond = limit is not None and limit < ...
5 years, 1 month ago #3
jsbfox_gmail.com
http://bugs.python.org/review/22619/diff/13056/Lib/traceback.py File Lib/traceback.py (right): http://bugs.python.org/review/22619/diff/13056/Lib/traceback.py#newcode57 Lib/traceback.py:57: cond = limit is not None and limit < ...
5 years, 1 month ago #4
storchaka_gmail.com
http://bugs.python.org/review/22619/diff/13056/Lib/traceback.py File Lib/traceback.py (right): http://bugs.python.org/review/22619/diff/13056/Lib/traceback.py#newcode57 Lib/traceback.py:57: cond = limit is not None and limit < ...
5 years, 1 month ago #5
francismb
I've just add a small review for the doc patch and hope it's constructive. Regards, ...
4 years, 7 months ago #6
storchaka_gmail.com
http://bugs.python.org/review/22619/diff/14688/Doc/library/traceback.rst File Doc/library/traceback.rst (right): http://bugs.python.org/review/22619/diff/14688/Doc/library/traceback.rst#newcode25 Doc/library/traceback.rst:25: Print up to *limit* stack trace entries from *traceback* ...
4 years, 7 months ago #7
berkerpeksag
4 years, 7 months ago #8
http://bugs.python.org/review/22619/diff/14696/Doc/library/traceback.rst
File Doc/library/traceback.rst (right):

http://bugs.python.org/review/22619/diff/14696/Doc/library/traceback.rst#newc...
Doc/library/traceback.rst:26: caller's frame) if *limit* is positive, print the
last *abs(limit)* entries
*abs(limit)* -> ``abs(limit)``

http://bugs.python.org/review/22619/diff/14696/Doc/library/traceback.rst#newc...
Doc/library/traceback.rst:26: caller's frame) if *limit* is positive, print the
last *abs(limit)* entries
I'm not a native speaker, but

    [...] positive, print the last *abs(limit)* entries otherwise.

can be changed to

    [...] positive. Otherwise, print the last *abs(limit)* entries.

http://bugs.python.org/review/22619/diff/14696/Doc/library/traceback.rst#newc...
Doc/library/traceback.rst:27: otherwise. If *limit* is omitted or ``None``, all
entries are printed. If
`None`` -> `None`` (the default)

http://bugs.python.org/review/22619/diff/14696/Doc/library/traceback.rst#newc...
Doc/library/traceback.rst:29: it should be an open file or file-like object to
receive the output.
Can you add a versionchanged directive to explain the newly added negative limit
support briefly.

Something like:

    .. versionchanged:: 3.5
       Added negative *limit* support.

It would be nice to add versionchanged directives to other functions if the
*limit* is changed.

http://bugs.python.org/review/22619/diff/14696/Doc/library/traceback.rst#newc...
Doc/library/traceback.rst:32: .. function:: extract_tb(traceback, limit=None)
Currently, functions are grouped by their prefix (e.g. print_*, format_*. etc.).
Unless there is a good reason to move the extract_tb function here, I'd prefer
to keep them grouped.

http://bugs.python.org/review/22619/diff/14696/Doc/library/traceback.rst#newc...
Doc/library/traceback.rst:78: if *limit* is positive, print the last
*abs(limit)* entries otherwise.  If *limit*
*abs(limit)* -> ``abs(limit)``
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+