> I don't know -- seems like both the API and the implementation are 
>> sufficiently different (actually kind of clever how it generates arbitrary 
>> tags via import statements).
>
>
> It may have a different implementation (otherwise it would an imitation of 
> html.py), but I guess he thought it would be better to reinvent the wheel 
> instead of looking for an existing implementation of almost the same 
> interface.


If you're going to write a library that generates HTML, creating a set of 
classes or functions named after the HTML tags and using keyword arguments 
for the HTML attributes is, I think, a fairly intuitive approach, and in 
fact, there are a number of similar libraries in Python alone (at least 
some pre-dating web2py). Beyond that high-level similarity, a lot of the 
details do differ, so I wouldn't necessarily expect an acknowledgement (at 
least not specifically of web2py). Whether the differences are significant 
enough to have warranted the effort to begin with is another question. 


> I like the "from htmlmodule import anytag" magic, but what if one wants to 
> use only tags defined by html or xhtml? Maybe it has a way of specifying 
> the set of element names allowed.
>

I guess you're responsible for knowing what tags you should be using in 
your HTML. Note, this is one way the library differs from web2py, which 
isn't even implementing some of the newer HTML5 tags and instead requires 
use of the generic TAG() class to generate newer tags.

Anthony 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to