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
5fe2c139
Commit
5fe2c139
authored
Jul 05, 2001
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
List constraints on xrange() objects.
parent
c09cf336
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
Doc/lib/libstdtypes.tex
Doc/lib/libstdtypes.tex
+14
-8
No files found.
Doc/lib/libstdtypes.tex
View file @
5fe2c139
...
@@ -379,21 +379,27 @@ separating items with commas: \code{[a, b, c]}. Tuples are
...
@@ -379,21 +379,27 @@ separating items with commas: \code{[a, b, c]}. Tuples are
constructed by the comma operator (not within square brackets), with
constructed by the comma operator (not within square brackets), with
or without enclosing parentheses, but an empty tuple must have the
or without enclosing parentheses, but an empty tuple must have the
enclosing parentheses, e.g.,
\code
{
a, b, c
}
or
\code
{
()
}
. A single
enclosing parentheses, e.g.,
\code
{
a, b, c
}
or
\code
{
()
}
. A single
item tuple must have a trailing comma, e.g.,
\code
{
(d,)
}
. Buffers are
item tuple must have a trailing comma, e.g.,
\code
{
(d,)
}
.
not directly supported by Python syntax, but can be created by calling the
builtin function
\function
{
buffer()
}
.
\bifuncindex
{
buffer
}
XRanges
objects are similar to buffers in that there is no specific syntax to
create them, but they are created using the
\function
{
xrange()
}
function.
\bifuncindex
{
xrange
}
\obindex
{
sequence
}
\obindex
{
sequence
}
\obindex
{
string
}
\obindex
{
string
}
\obindex
{
Unicode
}
\obindex
{
Unicode
}
\obindex
{
buffer
}
\obindex
{
tuple
}
\obindex
{
tuple
}
\obindex
{
list
}
\obindex
{
list
}
Buffer objects are not directly supported by Python syntax, but can be
created by calling the builtin function
\function
{
buffer()
}
.
\bifuncindex
{
buffer
}
. They don't support
concatenation or repetition.
\obindex
{
buffer
}
Xrange objects are similar to buffers in that there is no specific
syntax to create them, but they are created using the
\function
{
xrange()
}
function.
\bifuncindex
{
xrange
}
They don't support slicing,
concatenation or repetition, and using
\code
{
in
}
,
\code
{
not in
}
,
\function
{
min()
}
or
\function
{
max()
}
on them is inefficient.
\obindex
{
xrange
}
\obindex
{
xrange
}
S
equence types support the following operations. The
\samp
{
in
}
and
Most s
equence types support the following operations. The
\samp
{
in
}
and
\samp
{
not in
}
operations have the same priorities as the comparison
\samp
{
not in
}
operations have the same priorities as the comparison
operations. The
\samp
{
+
}
and
\samp
{
*
}
operations have the same
operations. The
\samp
{
+
}
and
\samp
{
*
}
operations have the same
priority as the corresponding numeric operations.
\footnote
{
They must
priority as the corresponding numeric operations.
\footnote
{
They must
...
...
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