Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
49abb6f9
Commit
49abb6f9
authored
Mar 06, 2014
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tracemalloc.py: add comments to show the format of tuples
parent
f6f45a09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Lib/tracemalloc.py
Lib/tracemalloc.py
+8
-0
No files found.
Lib/tracemalloc.py
View file @
49abb6f9
...
...
@@ -141,6 +141,7 @@ class Frame:
__slots__
=
(
"_frame"
,)
def
__init__
(
self
,
frame
):
# frame is a tuple: (filename: str, lineno: int)
self
.
_frame
=
frame
@
property
...
...
@@ -177,6 +178,8 @@ class Traceback(Sequence):
def
__init__
(
self
,
frames
):
Sequence
.
__init__
(
self
)
# frames is a tuple of frame tuples: see Frame constructor for the
# format of a frame tuple
self
.
_frames
=
frames
def
__len__
(
self
):
...
...
@@ -241,6 +244,8 @@ class Trace:
__slots__
=
(
"_trace"
,)
def
__init__
(
self
,
trace
):
# trace is a tuple: (size, traceback), see Traceback constructor
# for the format of the traceback tuple
self
.
_trace
=
trace
@
property
...
...
@@ -268,6 +273,7 @@ class Trace:
class
_Traces
(
Sequence
):
def
__init__
(
self
,
traces
):
Sequence
.
__init__
(
self
)
# traces is a tuple of trace tuples: see Trace constructor
self
.
_traces
=
traces
def
__len__
(
self
):
...
...
@@ -338,6 +344,8 @@ class Snapshot:
"""
def
__init__
(
self
,
traces
,
traceback_limit
):
# traces is a tuple of trace tuples: see _Traces constructor for
# the exact format
self
.
traces
=
_Traces
(
traces
)
self
.
traceback_limit
=
traceback_limit
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment