Knio / dominate

Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API. It allows you to write HTML pages in pure Python very concisely, which eliminate the need to learn another template language, and to take advantage of the more powerful features of Python.
GNU Lesser General Public License v3.0
1.72k stars 108 forks source link

small note on examples syntax #99

Open xkunglu opened 6 years ago

xkunglu commented 6 years ago

thanks for this; its great One note, in your examples you do >>> from dominate.tags import *

but your tag names ( and I understand you got them from html ) are so short and generic that they will almost invariably collide with temporary names - e.g. img, I use everywhere in local contexts. I would suggest that you follow the example of numpy or matplotlib that in their documents define a customary shorthand for its library that generally does not collide with anything else (np, plt). Its no big deal other than I doubt anyone not using your code exclusively will not find its own shorthand; and you could probably want to own it. For your stuff I'm using dt.

hbgodseeker commented 2 years ago

I totally agree

dekoza commented 2 years ago

import dominate.tags as dom :wink: