From b1a4e2c0b8eca4f7da9b562c6db5579f807fdd77 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 1 Aug 2010 21:40:25 +0000 Subject: Merged revisions 82832,82834 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ........ r82832 | georg.brandl | 2010-07-12 11:00:29 +0200 (Mo, 12 Jul 2010) | 1 line Take care of duplicate target name warnings. ........ r82834 | georg.brandl | 2010-07-12 11:06:13 +0200 (Mo, 12 Jul 2010) | 1 line Use raw string literals for regexes containing backlash. ........ --- Doc/faq/extending.rst | 8 +++----- Doc/library/re.rst | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Doc/faq/extending.rst b/Doc/faq/extending.rst index d2f94b9..4b3d6d5 100644 --- a/Doc/faq/extending.rst +++ b/Doc/faq/extending.rst @@ -26,6 +26,8 @@ function that is going to be called by the Python interpreter. Global or static C++ objects with constructors are probably not a good idea. +.. _c-wrapper-software: + Writing C is hard; are there any alternatives? ---------------------------------------------- @@ -197,11 +199,7 @@ begin by reading :ref:`the "Extending and Embedding" document whole lot of difference between C and C++ -- so the strategy of building a new Python type around a C structure (pointer) type will also work for C++ objects. -For C++ libraries, you can look at `SIP -`_, `CXX -`_, `Boost -`_, `Weave -`_ or `SWIG `_ +For C++ libraries, see :ref:`c-wrapper-software`. I added a module using the Setup file and the make fails; why? diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 2496835..448bcb7 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -1226,9 +1226,9 @@ in each word of a sentence except for the first and last characters:: ... random.shuffle(inner_word) ... return m.group(1) + "".join(inner_word) + m.group(3) >>> text = "Professor Abdolmalek, please report your absences promptly." - >>> re.sub("(\w)(\w+)(\w)", repl, text) + >>> re.sub(r"(\w)(\w+)(\w)", repl, text) 'Poefsrosr Aealmlobdk, pslaee reorpt your abnseces plmrptoy.' - >>> re.sub("(\w)(\w+)(\w)", repl, text) + >>> re.sub(r"(\w)(\w+)(\w)", repl, text) 'Pofsroser Aodlambelk, plasee reoprt yuor asnebces potlmrpy.' -- cgit v0.12