[packagekit] Enums in Python

Tom Parker palfrey at tevp.net
Tue Nov 6 13:13:01 PST 2007


On 06/11/2007, Richard Hughes <hughsient at gmail.com> wrote:
> I think use this opportunity to do 4) and use
>
> PK_FILTER_ENUM_DEVELOPMENT
> PK_FILTER_ENUM_INSTALLED
> PK_FILTER_ENUM_GUI
> PK_FILTER_ENUM_NOT_DEVELOPMENT
> PK_FILTER_ENUM_NOT_INSTALLED
> PK_FILTER_ENUM_NOT_GUI
>
> I don't like NON in the name, it doesn't sound right. If this is okay I
> can make the change trivially. Tom, is this okay?

Yeah, that's way cleaner. The python script is happy provided you
stick to the PK_thing_ENUM_some_words format, although I'm perfectly
happy to make it more robust in the future if there are other formats
to deal with as well.

Of course, now this means you gotta fix the python scripts as well
when you change enum names ;-)

Tom



More information about the PackageKit mailing list