[Python-Dev] cpython: simplify and rewrite the zipimport part of 702009f3c0b1 a bit (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Fri May 25 19:14:31 CEST 2012


On Fri, 25 May 2012 18:57:57 +0200 Georg Brandl <g.brandl at gmx.net> wrote:

Am 25.05.2012 07:54, schrieb benjamin.peterson: > http://hg.python.org/cpython/rev/a47d32a28662 > changeset: 77129:a47d32a28662 > user: Benjamin Peterson <benjamin at python.org> > date: Thu May 24 22:54:15 2012 -0700 > summary: > simplify and rewrite the zipimport part of 702009f3c0b1 a bit > > files: > Modules/zipimport.c | 92 ++++++++++++++------------------ > 1 files changed, 41 insertions(+), 51 deletions(-) > > > diff --git a/Modules/zipimport.c b/Modules/zipimport.c > --- a/Modules/zipimport.c > +++ b/Modules/zipimport.c > @@ -319,13 +319,20 @@ > return MINOTFOUND; > } > > +typedef enum { > + flerror, > + flnotfound, > + flmodulefound, > + flnsfound > +} findloaderresult;

This is probably minor, but wouldn't it make more sense to have those constants uppercased? At least that's the general style we have in the codebase for enum values.

+1, this surprised me too.

Regards

Antoine.



More information about the Python-Dev mailing list