summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-11-24 07:20:14 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2013-11-24 07:20:14 (GMT)
commitfe94d8adfcf146af7531a315092e3ae954b68968 (patch)
tree0aacdd5e9ca70ddafb0019d93304aa2130968816 /Python/bltinmodule.c
parent1d1d8343286cb09b43e333cd96b4061ef18a1b3d (diff)
parenta4b7a7548c43d1d7f4fd52129aa32340ca15af6a (diff)
downloadcpython-fe94d8adfcf146af7531a315092e3ae954b68968.zip
cpython-fe94d8adfcf146af7531a315092e3ae954b68968.tar.gz
cpython-fe94d8adfcf146af7531a315092e3ae954b68968.tar.bz2
Merge heads
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 96ccd64..057ab47 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -350,7 +350,11 @@ builtin_bin(PyObject *self, PyObject *v)
PyDoc_STRVAR(bin_doc,
"bin(number) -> string\n\
\n\
-Return the binary representation of an integer.");
+Return the binary representation of an integer.\n\
+\n\
+ >>> bin(2796202)\n\
+ '0b1010101010101010101010'\n\
+");
static PyObject *
@@ -1276,7 +1280,11 @@ builtin_hex(PyObject *self, PyObject *v)
PyDoc_STRVAR(hex_doc,
"hex(number) -> string\n\
\n\
-Return the hexadecimal representation of an integer.");
+Return the hexadecimal representation of an integer.\n\
+\n\
+ >>> hex(3735928559)\n\
+ '0xdeadbeef'\n\
+");
static PyObject *
@@ -1476,7 +1484,11 @@ builtin_oct(PyObject *self, PyObject *v)
PyDoc_STRVAR(oct_doc,
"oct(number) -> string\n\
\n\
-Return the octal representation of an integer.");
+Return the octal representation of an integer.\n\
+\n\
+ >>> oct(342391)\n\
+ '0o1234567'\n\
+");
static PyObject *