diff --git a/diceware.py b/diceware.py
index effc5b1405c4b3c5dc27d9052b750a30dd0dc51f..72c9eca6a326739cfab13b59ef16aac4dd975814 100644
--- a/diceware.py
+++ b/diceware.py
@@ -120,6 +120,13 @@ def get_passphrase(wordnum=6, specialsnum=1, delimiter='', lang='en',
 
 
 def main(args=None):
+    """Main programme.
+
+    Called when `diceware` script is called.
+
+    `args` is a list of command line arguments to process. If no such
+    args are given, we use `sys.argv`.
+    """
     if args is None:
         args = sys.argv[1:]
     options = handle_options(args)