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
53349a00
Commit
53349a00
authored
Feb 14, 2008
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor doc updates for Py3.0
parent
51b9c247
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
32 deletions
+3
-32
Doc/library/functions.rst
Doc/library/functions.rst
+3
-32
No files found.
Doc/library/functions.rst
View file @
53349a00
...
...
@@ -92,14 +92,6 @@ available. They are listed here in alphabetical order.
return
False
..
function
::
basestring
()
This
abstract
type
is
the
superclass
for
:
class
:`
str
`.
It
cannot
be
called
or
instantiated
,
but
it
can
be
used
to
test
whether
an
object
is
an
instance
of
:
class
:`
str
`
(
or
a
user
-
defined
type
inherited
from
:
class
:`
basestring
`).
..
function
::
bin
(
x
)
Convert
an
integer
number
to
a
binary
string
.
The
result
is
a
valid
Python
...
...
@@ -296,20 +288,7 @@ available. They are listed here in alphabetical order.
class
's attributes, and recursively of the attributes of its class'
s
base
classes
.
The
resulting
list
is
sorted
alphabetically
.
For
example
::
>>>
import
struct
>>>
dir
()
[
'__builtins__'
,
'__doc__'
,
'__name__'
,
'struct'
]
>>>
dir
(
struct
)
[
'__doc__'
,
'__name__'
,
'calcsize'
,
'error'
,
'pack'
,
'unpack'
]
>>>
class
Foo
(
object
):
...
def
__dir__
(
self
):
...
return
[
"kan"
,
"ga"
,
"roo"
]
...
>>>
f
=
Foo
()
>>>
dir
(
f
)
[
'ga'
,
'kan'
,
'roo'
]
The
resulting
list
is
sorted
alphabetically
.
..
note
::
...
...
@@ -623,10 +602,7 @@ available. They are listed here in alphabetical order.
returns ``['a', 'b', 'c']`` and ``list( (1, 2, 3) )`` returns ``[1, 2, 3]``. If
no argument is given, returns a new empty list, ``[]``.
:class:`list` is a mutable sequence type, as documented in
:ref:`typesseq`. For other containers see the built in :class:`dict`,
:class:`set`, and :class:`tuple` classes, and the :mod:`collections` module.
:class:`list` is a mutable sequence type, as documented in :ref:`typesseq`.
.. function:: locals()
...
...
@@ -948,9 +924,6 @@ available. They are listed here in alphabetical order.
Return
a
new
set
,
optionally
with
elements
are
taken
from
*
iterable
*.
The
set
type
is
described
in
:
ref
:`
types
-
set
`.
For
other
containers
see
the
built
in
:
class
:`
dict
`,
:
class
:`
list
`,
and
:
class
:`
tuple
`
classes
,
and
the
:
mod
:`
collections
`
module
.
..
function
::
setattr
(
object
,
name
,
value
)
...
...
@@ -1082,9 +1055,7 @@ available. They are listed here in alphabetical order.
3
])``
returns
``(
1
,
2
,
3
)``.
If
no
argument
is
given
,
returns
a
new
empty
tuple
,
``()``.
:
class
:`
tuple
`
is
an
immutable
sequence
type
,
as
documented
in
:
ref
:`
typesseq
`.
For
other
containers
see
the
built
in
:
class
:`
dict
`,
:
class
:`
list
`,
and
:
class
:`
set
`
classes
,
and
the
:
mod
:`
collections
`
module
.
:
class
:`
tuple
`
is
an
immutable
sequence
type
,
as
documented
in
:
ref
:`
typesseq
`.
..
function
::
type
(
object
)
...
...
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