[PATCH 7 of 8] extensions: use the generated list of extensions (issue1708)
Martin Geisler
mg at lazybytes.net
Mon Jul 6 18:13:31 CDT 2009
Cédric Duval <cedricduval at free.fr> writes:
> diff --git a/mercurial/extensions.py b/mercurial/extensions.py
> --- a/mercurial/extensions.py
> +++ b/mercurial/extensions.py
> @@ -122,10 +122,16 @@
> '''find disabled extensions
> returns a dict of {name: desc}, and the max name length'''
>
> + # extensions from the source tree (list generated at build-time)
> + import extdoc_list
> + d = extdoc_list.descriptions
> + if not raw:
> + d = dict([ (k, extdoc.synopsis(v)) for k, v in d.iteritems() ])
Adding spaces inside the brackets is actually not PEP8 style, but I can
understand why you would do it. Now that we're using Python 2.4, a
generator expression is an alternative:
d = dict((k, extdoc.synopsis(v)) for k, v in d.iteritems())
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090707/cb233775/attachment.pgp
More information about the Mercurial-devel
mailing list