On 25 November 2003, David Binger said: > Agreed. The set of xhtml attributes isn't huge, but there are some > opportunities > for confusion there: 'title' and 'id' come to mind, and what about > 'xml:lang'? Namespace confusion bad. Syntactic sugar good. Short keyword args good. Funky lowercase type names for web-specific stuff very handy (witness htmltext). How about (taking the caller's point of view): StringWidget("name", value="Greg", attrs=attrs(size=20, class_='myform')) Note 'class_' instead of 'css_class' -- this is the convention used by PyGTK to avoid collisions with keywords (builtins too? can't remember), and it's as good as any. Also note that 'attrs' could just be an alias for 'dict', since the dict() builtin in Python 2.2 works as expected: >>> dict(foo=34, bar=43) {'foo': 34, 'bar': 43} Cool. (Yes, this would mean requiring Python 2.2, but nobody objected to this idea when it was floated a few weeks ago...) I think this can be done without messing with the htmltag() function, which we really don't want to break at this point. (Maaaaaybe break 'css_class' -- how long has that been in Quixote, anyways? Anyone howl at the idea of changing it to 'class_'?) Greg -- Greg Wardhttp://www.gerg.ca/ I appoint you ambassador to Fantasy Island!!!