← Back to team overview

software-store-developers team mailing list archive

Re: enums style proposal

 

Yo,

On Mon, Jun 6, 2011 at 7:16 PM, Olivier Tilloy <olivier@xxxxxxxxxx> wrote:

> Hey Matt,
>
> I like the idea, it’d make the code more elegant. I had a look at the
> implementation too, and I realized that I would have done it in a
> different way (not necessarily better, just different).
> I would naturally have changed the enums.py for an enum folder
> containing submodules for each group of constants. Ungrouped constants
> would go in the module’s __init__.py.
> I don’t know how the two implementations compare in terms of
> elegance/performance/potential issues/etc… I just thought I’d mention my
> first idea for discussion, but as far as I’m concerned your
>  implementation looks fine to me, if it works go for it!
>

I had thought of this but in for me i found it easier as far as code
browsing to have all the enums in a single file, but the way you mention
could afford 'groupings' and granularity, so it would be the best of both
worlds


>  Cheers,


> Olivier
>

Cheers

-- 
>From the mind of me!

References