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
e7eed78f
Commit
e7eed78f
authored
Dec 23, 2018
by
Jess Shapiro
Committed by
Raymond Hettinger
Dec 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify the behavior of the staticmethod builtin (GH-4362)
parent
d83f5bda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Objects/funcobject.c
Objects/funcobject.c
+4
-2
No files found.
Objects/funcobject.c
View file @
e7eed78f
...
@@ -838,7 +838,8 @@ PyClassMethod_New(PyObject *callable)
...
@@ -838,7 +838,8 @@ PyClassMethod_New(PyObject *callable)
...
...
It can be called either on the class (e.g. C.f()) or on an instance
It can be called either on the class (e.g. C.f()) or on an instance
(e.g. C().f()); the instance is ignored except for its class.
(e.g. C().f()). Both the class and the instance are ignored, and
neither is passed implicitly as the first argument to the method.
Static methods in Python are similar to those found in Java or C++.
Static methods in Python are similar to those found in Java or C++.
For a more advanced concept, see class methods above.
For a more advanced concept, see class methods above.
...
@@ -945,7 +946,8 @@ To declare a static method, use this idiom:\n\
...
@@ -945,7 +946,8 @@ To declare a static method, use this idiom:\n\
...
\n
\
...
\n
\
\n
\
\n
\
It can be called either on the class (e.g. C.f()) or on an instance
\n
\
It can be called either on the class (e.g. C.f()) or on an instance
\n
\
(e.g. C().f()). The instance is ignored except for its class.
\n
\
(e.g. C().f()). Both the class and the instance are ignored, and
\n
\
neither is passed implicitly as the first argument to the method.
\n
\
\n
\
\n
\
Static methods in Python are similar to those found in Java or C++.
\n
\
Static methods in Python are similar to those found in Java or C++.
\n
\
For a more advanced concept, see the classmethod builtin."
);
For a more advanced concept, see the classmethod builtin."
);
...
...
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