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
d0731072
Commit
d0731072
authored
Apr 13, 2010
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of multi-row cells.
parent
d5c50b32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
Doc/howto/descriptor.rst
Doc/howto/descriptor.rst
+10
-10
No files found.
Doc/howto/descriptor.rst
View file @
d0731072
...
...
@@ -323,16 +323,16 @@ becomes ``f(*args)``.
This chart summarizes the binding and its two most useful variants:
+-----------------+--------------
+--------------
--------+------------------+
| Transformation |
|
Called from an | Called from a |
| |
|
Object | Class |
+=================+==============
+==============
========+==================+
|
| function
| f(obj, \*args) | f(\*args) |
+
+
--------------+----------------------+------------------+
|
Descriptor | staticmethod
| f(\*args) | f(\*args) |
+
+
--------------+----------------------+------------------+
|
| classmethod
| f(type(obj), \*args) | f(klass, \*args) |
+-----------------+--------------
+--------------
--------+------------------+
+-----------------+----------------------+------------------+
| Transformation | Called from an | Called from a |
| | Object | Class |
+=================+======================+==================+
|
function
| f(obj, \*args) | f(\*args) |
+
---
--------------+----------------------+------------------+
|
staticmethod
| f(\*args) | f(\*args) |
+
---
--------------+----------------------+------------------+
|
classmethod
| f(type(obj), \*args) | f(klass, \*args) |
+-----------------+----------------------+------------------+
Static methods return the underlying function without changes. Calling either
``c.f`` or ``C.f`` is the equivalent of a direct lookup into
...
...
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