Not sure if this is really better or even more pythonic, but if you like one-liners that exercise the language:
attributeNames = dict( [("AttributeName.%d" % (n+1), attribute) for
n,attribute in enumerate(attributes)] )
What this does is create a list (using a list comprehension and the
enumerate function) of ("AttributeName.x", attribute) tuples which is
then be used to initialize a dictionary.
--
http://mail.python.org/mailman/listinfo/python-list
