Hatena::Grouppython

Pythonの覚書

2012-12-04

Pythonの組み込み関数一覧(builtin functions)

| 21:43 | Pythonの組み込み関数一覧(builtin functions) - Pythonの覚書 を含むブックマーク はてなブックマーク - Pythonの組み込み関数一覧(builtin functions) - Pythonの覚書 Pythonの組み込み関数一覧(builtin functions) - Pythonの覚書 のブックマークコメント

意外と簡単に網羅出来た。

一応バージョンは以下

Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
まず、locals()関数を呼び出す。
>>> locals()
{'__builtins__': <module '__builtin__' (built-in)>, '__name__': '__main__', '__doc__': None, '__package__': None}

'__builtins__'の中に組み込み関数や予約語の定義がある。

dir()で見る。

Pythonの命名規則で、定義は大文字からはじまり、関数は小文字から始まるようになっている様子。(たぶん・・・)

>>> for spam in dir(__builtins__):
	print spam

	
ArithmeticError
AssertionError
AttributeError
BaseException
BufferError
BytesWarning
DeprecationWarning
EOFError
Ellipsis
EnvironmentError
Exception
False
FloatingPointError
FutureWarning
GeneratorExit
IOError
ImportError
ImportWarning
IndentationError
IndexError
KeyError
KeyboardInterrupt
LookupError
MemoryError
NameError
None
NotImplemented
NotImplementedError
OSError
OverflowError
PendingDeprecationWarning
ReferenceError
RuntimeError
RuntimeWarning
StandardError
StopIteration
SyntaxError
SyntaxWarning
SystemError
SystemExit
TabError
True
TypeError
UnboundLocalError
UnicodeDecodeError
UnicodeEncodeError
UnicodeError
UnicodeTranslateError
UnicodeWarning
UserWarning
ValueError
Warning
WindowsError
ZeroDivisionError
_
__debug__
__doc__
__import__
__name__
__package__
abs
all
any
apply
basestring
bin
bool
buffer
bytearray
bytes
callable
chr
classmethod
cmp
coerce
compile
complex
copyright
credits
delattr
dict
dir
divmod
enumerate
eval
execfile
exit
file
filter
float
format
frozenset
getattr
globals
hasattr
hash
help
hex
id
input
int
intern
isinstance
issubclass
iter
len
license
list
locals
long
map
max
memoryview
min
next
object
oct
open
ord
pow
print
property
quit
range
raw_input
reduce
reload
repr
reversed
round
set
setattr
slice
sorted
staticmethod
str
sum
super
tuple
type
unichr
unicode
vars
xrange
zip
>>> 

HeatherHeather2013/03/15 16:24That's really thininkg of the highest order

kqljbqczdigkqljbqczdig2013/03/17 10:46hFKdyd , [url=http://bsfrfqwkvlph.com/]bsfrfqwkvlph[/url], [link=http://dihwrdrcbnip.com/]dihwrdrcbnip[/link], http://kepbyvbburai.com/

ojznuoojznuo2013/03/18 21:09UxNW0Z <a href="http://sfwavnxqxycb.com/">sfwavnxqxycb</a>

nldvshapclknldvshapclk2013/03/19 07:09Ciqxgl , [url=http://qwtefnzopzhp.com/]qwtefnzopzhp[/url], [link=http://julzfsaydoxt.com/]julzfsaydoxt[/link], http://oprebholqtnw.com/