Templating and syntactic sugar
Skip Montanaro
skip at pobox.com
Mon Aug 6 11:05:17 EDT 2001
Tom> You can get and set variables in the template with tpl.var(), but I
Tom> want to be able to do something like tpl.var.xyzzy = "Hello,
Tom> world!", just because I like that syntax, but still have this
Tom> actually make a method call. I'm pretty sure this is possible in
Tom> python (with operator overloading?), can anyone tell me how?
Check up on __getattr__ and __setattr__.
--
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/
More information about the Python-list
mailing list