From 362caaf02f3a25b7e626572aa30b87771c2c8f4d Mon Sep 17 00:00:00 2001 From: Ben McGinnes Date: Tue, 18 Sep 2018 08:32:30 +1000 Subject: docs: python bindings * Updated the Cython example code slightly, along with the corresponding explanation. --- lang/python/docs/gpgme-python-howto.org | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lang/python/docs/gpgme-python-howto.org') diff --git a/lang/python/docs/gpgme-python-howto.org b/lang/python/docs/gpgme-python-howto.org index 0d7f9b4e..0836d21d 100644 --- a/lang/python/docs/gpgme-python-howto.org +++ b/lang/python/docs/gpgme-python-howto.org @@ -2025,8 +2025,9 @@ publist = list(pubkeys) pubnum = len(publist) print(""" - Number of secret keys: {0} - Number of public keys: {1} + Number of secret keys: {0} + Number of public keys: {1} + """.format(secnum, pubnum)) #+END_SRC @@ -2077,7 +2078,10 @@ On the other hand it ran in nearly half the time; taking 6 minutes and which the CPython script alone took. The =keycount.pyx= and =setup.py= files used to generate this example -have been added to the =examples/howto/advanced/cython/= directory. +have been added to the =examples/howto/advanced/cython/= directory +The example versions include some additional options to annotate the +existing code and to detect Cython's use. The latter comes from the +[[http://docs.cython.org/en/latest/src/tutorial/pure.html#magic-attributes-within-the-pxd][Magic Attributes]] section of the Cython documentation. * Miscellaneous work-arounds -- cgit