[albatross-users] illuminating text
Eric S. Johansson
esj at harvee.org
Wed Jul 30 08:09:02 EST 2003
found in Python: essential reference; second edition
page 65, chapter 6
""" finally, starting in Python 2.1, functions and methods can have arbitrary
attributes attached to them. For example:
def foo():
print "hello world"
foo.secure = 1
foo.private = 1
function attributes are stored in a dictionary that is available as the __dict__
attributes of a function or method.
the primary use of function attributes is in specialized applications such as
parser generators or network applications that would like to attach additional
information to a function. Previously, the docstring was the only place to
store such information.
"""
I wish I had remembered that bit of text when I had started using albatross. It
might have made things a bit less crank inspiring. ;-)
By the way, I'm having good success and even though my HTML templates are still,
shall we say, primitive, they are improving with time and scar tissue.
---eric
More information about the Albatross-users
mailing list