Levi wrote:
> If determining the type -v- instance mattered, I would have to note
> that forms don't appear to be stateful. And (I can't believe I'm saying
> this, dimiss it immediately!) that it could be implemented as a
> singleton. Of course, all of my comments are makeing me feel like I'm
> becoming an "architect astronaut"
> (http://www.joelonsoftware.com/articles/fog0000000018.html).

Singletons in Python are usually just module-level globals.  Unlike some
languages (Java specifically) you can use any kind of object at the
module level, including instances, and you don't (and shouldn't) need to
worry about what class that instance uses.  FormEncode is a little
unusual, though, because it's using an almost prototype-OO pattern.

-- 
Ian Bicking  |  [EMAIL PROTECTED]  |  http://blog.ianbicking.org

Reply via email to