Skip to content

Commit 8c57000

Browse files
author
fdrake
committed
Added docstring to crypt.crypt() based on the documentation. git-svn-id: http://svn.python.org/projects/python/trunk@14293 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 9f8a5f2 commit 8c57000

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Modules/cryptmodule.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,17 @@ static PyObject *crypt_crypt(self, args)
2222

2323
}
2424

25+
static char crypt_crypt__doc__[] = "\
26+
crypt(word, salt) -> string\n\
27+
word will usually be a user's password. salt is a 2-character string\n\
28+
which will be used to select one of 4096 variations of DES. The characters\n\
29+
in salt must be either \".\", \"/\", or an alphanumeric character. Returns\n\
30+
the hashed password as a string, which will be composed of characters from\n\
31+
the same alphabet as the salt.";
32+
33+
2534
static PyMethodDef crypt_methods[] = {
26-
{"crypt", crypt_crypt},
35+
{"crypt", crypt_crypt, 0, crypt_crypt__doc__},
2736
{NULL, NULL} /* sentinel */
2837
};
2938

0 commit comments

Comments
 (0)