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
5918f8de
Commit
5918f8de
authored
Jun 29, 2003
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes to punctuation and grammar.
parent
bc05fc5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Doc/ref/ref3.tex
Doc/ref/ref3.tex
+5
-5
No files found.
Doc/ref/ref3.tex
View file @
5918f8de
...
...
@@ -1324,15 +1324,15 @@ each instance.
\begin{datadesc}
{__
slots
__}
This class variable can be assigned a string, iterable, or sequence of strings
with variable names used by instances. If defined in a new-style class
definition,
\var
{__
slots
__}
reserves space for the declared variables
with variable names used by instances. If defined in a new-style class
,
\var
{__
slots
__}
reserves space for the declared variables
and prevents the automatic creation of
\var
{__
dict
__}
and
\var
{__
weakref
__}
for each instance.
\versionadded
{
2.2
}
\end{datadesc}
\noindent
Notes on
U
sing
\var
{__
slots
__}
Notes on
u
sing
\var
{__
slots
__}
\begin{itemize}
...
...
@@ -1349,7 +1349,7 @@ specifically listed in the sequence of instance variable names]{2.3}
defining
\var
{__
slots
__}
do not support weak references to its instances.
If weak reference support is needed, then add
\code
{
'
__
weakref
__
'
}
to the
sequence of strings in the
\var
{__
slots
__}
declaration.
\versionchanged
[Previously, adding
\code
{
__
weakref
__
}
to the
\var
{__
slots
__}
\versionchanged
[Previously, adding
\code
{
'
__
weakref
__
'
}
to the
\var
{__
slots
__}
declaration would not enable support for weak references]
{
2.3
}
\item
\var
{__
slots
__}
are implemented at the class level by creating
...
...
@@ -1370,7 +1370,7 @@ unless they also define \var{__slots__}.
\item
\var
{__
slots
__}
do not work for classes derived from ``variable-length''
built-in types such as
\class
{
long
}
,
\class
{
str
}
and
\class
{
tuple
}
.
\item
Any non-string iterable may be assigned
\var
{__
slots
__}
.
\item
Any non-string iterable may be assigned
to
\var
{__
slots
__}
.
Mappings may also be used; however, in the future, special meaning may
be assigned to the values corresponding to each key.
...
...
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