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
825bae7c
Commit
825bae7c
authored
Nov 02, 1995
by
Sjoerd Mullender
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also remember the module a class is defined in.
parent
fa7aece2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Lib/pyclbr.py
Lib/pyclbr.py
+3
-2
No files found.
Lib/pyclbr.py
View file @
825bae7c
...
...
@@ -52,7 +52,8 @@ _modules = {} # cache of modules we've seen
# each Python class is represented by an instance of this class
class
Class
:
'''Class to represent a Python class.'''
def
__init__
(
self
,
name
,
super
,
file
,
lineno
):
def
__init__
(
self
,
module
,
name
,
super
,
file
,
lineno
):
self
.
module
=
module
self
.
name
=
name
if
super
is
None
:
super
=
[]
...
...
@@ -187,7 +188,7 @@ def readmodule(module, path = []):
names
.
append
(
n
)
inherit
=
names
# remember this class
cur_class
=
Class
(
class_name
,
inherit
,
file
,
lineno
)
cur_class
=
Class
(
module
,
class_name
,
inherit
,
file
,
lineno
)
dict
[
class_name
]
=
cur_class
continue
if
is_method
.
match
(
line
)
>=
0
:
...
...
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