Make Lib/crypt.py meet PEP 8 standards. This also led to a tweak in the new API

by making methods() into a module attribute as it is statically calculated.
This commit is contained in:
Brett Cannon 2011-02-22 21:48:06 +00:00
parent 543b7f3ee9
commit daa5799cb8
3 changed files with 67 additions and 65 deletions

View file

@ -60,6 +60,20 @@ are available on all platforms):
.. versionadded:: 3.3
Module Attributes
-----------------
.. attribute:: methods
A list of available password hashing algorithms, as
``crypt.METHOD_*`` objects. This list is sorted from strongest to
weakest, and is guaranteed to have at least ``crypt.METHOD_CRYPT``.
.. versionadded:: 3.3
Module Functions
----------------
@ -98,13 +112,6 @@ The :mod:`crypt` module defines the following functions:
Before version 3.3, *salt* must be specified as a string and cannot
accept ``crypt.METHOD_*`` values (which don't exist anyway).
.. function:: methods()
Return a list of available password hashing algorithms, as
``crypt.METHOD_*`` objects. This list is sorted from strongest to
weakest, and is guaranteed to have at least ``crypt.METHOD_CRYPT``.
.. versionadded:: 3.3
.. function:: mksalt(method=None)