Brython - Python in the browser
stefan_ml at behnel.de
Fri Dec 21 12:25:01 CET 2012
Pierre Quentel, 20.12.2012 10:42:
> Le jeudi 20 décembre 2012 01:54:44 UTC+1, Ian a écrit :
>> On Wed, Dec 19, 2012 at 5:07 PM, Terry Reedy wrote:
>>>> To create an element, for instance an HTML anchor :
>>>> doc <= A('Python',href="http://www.python.org")
>>> To me, that is a awful choice and I urge you to change it.
>> +1. The DOM already has a well-established API. [...]
>> link = document.createElement('a')
>> link.setAttribute("href", "http://www.python.org/")
If that's your intention, then instead of coming up with something totally
new, unpythonic and ugly, why not take the normal Python route and
implement a subset of the ElementTree API?
More information about the Python-list