[niemeyer@conectiva.com: Re: [Python-Dev] Python's footprint]

Gustavo Niemeyer niemeyer@conectiva.com
Thu, 10 Jan 2002 22:49:08 -0200


--VywGB/WGlW4DM4P8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi everyone!

Now that 2.2 is history (well, kind of ;-), would it be the time to
think about this again?

Thank you!

----- Forwarded message from Gustavo Niemeyer <niemeyer@conectiva.com> -----

Date: Wed, 14 Nov 2001 20:07:03 -0200
From: Gustavo Niemeyer <niemeyer@conectiva.com>
To: python-dev@python.org
Subject: Re: [Python-Dev] Python's footprint
In-Reply-To: <20011108165105.A29947@gerg.ca>
User-Agent: Mutt/1.3.23i

> > It means that about 10% of python's executable is documentation.
[...]
> Anyways, that sounds like a useful idea.  It would probably be a big
> patch that touches lots of files, so it's unlikely to get into Python
> 2.2.  You might consider whipping up a patch now to get it under
> consideration early in 2.3's life-cycle.

Ok. The patch is ready (attached). It's very simple. Just introducing
two new macros: Py_DOCSTR() to be used in usual doc strings, and
WITH_DOC_STRINGS, for more complex ones (sys module's doc string
comes into my mind).

I'd just like to know the moment when it is going to be applied, so I
can change every documentation string accordingly and submit the patch.
I could do this right now, for sure. But if it's going to be applied
just for 2.3, the patch will certainly be broken at that time.

Thanks!

--=20
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]

--- Python-2.2.orig/pyconfig.h.in	Wed Nov 14 17:54:31 2001
+++ Python-2.2/pyconfig.h.in	Wed Nov 14 19:08:08 2001
@@ -765,3 +765,13 @@
 #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
 #endif
=20
+/* Define if you want to have inline documentation. */
+#undef WITH_DOC_STRINGS
+
+/* Define macro for inline documentation. */
+#ifdef WITH_DOC_STRINGS
+#define Py_DOCSTR(x) x
+#else
+#define Py_DOCSTR(x) ""
+#endif
+
--- Python-2.2.orig/configure.in	Wed Nov 14 17:54:31 2001
+++ Python-2.2/configure.in	Wed Nov 14 19:20:07 2001
@@ -1305,6 +1305,20 @@
 fi
 AC_MSG_RESULT($with_cycle_gc)
=20
+# Check for --with-doc-strings
+AC_MSG_CHECKING(for --with-doc-strings)
+AC_ARG_WITH(doc-strings,
+[  --with(out)-doc-strings         disable/enable documentation strings])
+
+if test -z "$with_doc_strings"
+then with_doc_strings=3D"yes"
+fi
+if test "$with_doc_strings" !=3D "no"
+then
+    AC_DEFINE(WITH_DOC_STRINGS)
+fi
+AC_MSG_RESULT($with_doc_strings)
+
 # Check for Python-specific malloc support
 AC_MSG_CHECKING(for --with-pymalloc)
 AC_ARG_WITH(pymalloc,


----- End forwarded message -----

--=20
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]

--VywGB/WGlW4DM4P8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8PjaEIlOymmZkOgwRAkI2AKCMbpUhatkpfUqIkDOzjBXKCBwUPQCcCIcH
qkLKz+rldrQBaoU7c5G23V4=
=v6Cf
-----END PGP SIGNATURE-----

--VywGB/WGlW4DM4P8--