[git] GPGME - branch, master, updated. gpgme-1.12.0-114-gdc5f416

by Ben McGinnes cvs at cvs.gnupg.org
Fri Dec 21 11:02:39 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  dc5f416351e47bfafb46a53f8fd8435dd6c231ba (commit)
      from  daded4925489d306f6a65271c2f55101b331187c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dc5f416351e47bfafb46a53f8fd8435dd6c231ba
Author: Ben McGinnes <ben at adversary.org>
Date:   Fri Dec 21 21:01:04 2018 +1100

    python: groups example
    
    * Tightened code a little more.
    
    Signed-off-by: Ben McGinnes <ben at adversary.org>

diff --git a/lang/python/doc/src/gpgme-python-howto b/lang/python/doc/src/gpgme-python-howto
index 187339d..bee661b 100644
--- a/lang/python/doc/src/gpgme-python-howto
+++ b/lang/python/doc/src/gpgme-python-howto
@@ -3023,12 +3023,12 @@ groups = line.split(":")[-1].replace('"', '').split(',')
 group_lines = []
 group_lists = []
 
-for i in range(len(groups)):
-    group_lines.append(groups[i].split("="))
-    group_lists.append(groups[i].split("="))
+for group in groups:
+    group_lines.append(group.split("="))
+    group_lists.append(group.split("="))
 
-for i in range(len(group_lists)):
-    group_lists[i][1] = group_lists[i][1].split()
+for glist in group_lists:
+    glist[1] = glist[1].split()
 #+END_SRC
 
 The result of that code is that =group_lines= is a list of lists where
diff --git a/lang/python/examples/howto/groups.py b/lang/python/examples/howto/groups.py
index 98659cc..81cb6e6 100644
--- a/lang/python/examples/howto/groups.py
+++ b/lang/python/examples/howto/groups.py
@@ -54,9 +54,9 @@ groups = line.split(":")[-1].replace('"', '').split(',')
 group_lines = []
 group_lists = []
 
-for i in range(len(groups)):
-    group_lines.append(groups[i].split("="))
-    group_lists.append(groups[i].split("="))
+for group in groups:
+    group_lines.append(group.split("="))
+    group_lists.append(group.split("="))
 
-for i in range(len(group_lists)):
-    group_lists[i][1] = group_lists[i][1].split()
+for glist in group_lists:
+    glist[1] = glist[1].split()

-----------------------------------------------------------------------

Summary of changes:
 lang/python/doc/src/gpgme-python-howto | 10 +++++-----
 lang/python/examples/howto/groups.py   | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list