Yeah, I've seen this convention in other libraries. The nice thing about it
is that no one can reference that value without using the variable, which
enforces the abstraction, whereas with a string (and we see this all the
time in our code) sometimes people use the variable, and sometimes they
just straight up use the string.

The representation in a debugger is a valid point. Another option for this
type of thing is to make an empty class and use that (sort of like you do
with exceptions). Shrug.
On Dec 19, 2013 10:58 AM, "Cory Zue" <notifications@github.com> wrote:

> In couchforms/const.py:
>
> > \ No newline at end of file
> > +
> > +MULTIPART_FILENAME_ERROR = object()
>
> is this an accepted convention for constants or some invention of yours? i
> can see the theoretical value of being super explicit, but at the same
> time, i could also see disadvantages to this approach (this thing will be
> obtuse in a debugger, for example). strings seem totally reasonable to me
> for this type of thing too.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/dimagi/couchforms/pull/76/files#r8473258>
> .
>