Anonymous class members

Ben Last ben at benlast.com
Mon Sep 27 10:28:43 EDT 2004


I'm probably missing something here... but if you want a collection of
anonymous attributes... why not just store them in a list?

> -----Original Message-----
> From Carlos Ribeiro

>     class body(HtmlBody)
>         H1('Anonymous class members' )
>         P('This is an example of anonymous class members')
Give yourself a class such as:
class HtmlElement:
	tag = None
	content = None
	attributes = None
	def __init__(self, tag, content, attributes):

etc etc etc, and have a list of them in the body?  Thus you have un-named
data.

Yours, admitting freely that he skimmed the email whilst drinking tea...
ben




More information about the Python-list mailing list