[EMAIL PROTECTED] writes:

> Currently I'm just putting this at the top of the file:
> 
>     py=1
>     funcpre=2
>     funcpost=3
>     ...

Slightly better is:

    py = object()
    funcpre = object()
    funcpost = object()

Thus, those names are all bound to unique objects, that won't be
unexpectedly duplicated by some other value.

> but I'm curious if there's a better way of doing this, some kind of
> enum-like thing or somesuch.

Please try the 'enum' package in the Cheeseshop:

    <URL:http://pypi.python.org/pypi/enum>

-- 
 \       “When a well-packaged web of lies has been sold to the masses |
  `\    over generations, the truth will seem utterly preposterous and |
_o__)                    its speaker a raving lunatic.” —Dresden James |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to