|
From: Aahz <aa...@py...> - 2003-05-11 21:36:14
|
On Sun, May 11, 2003, Stefan Merten wrote: > 4 hours ago Aahz wrote: >> On Sun, May 11, 2003, Stefan Merten wrote: >>> >>> Since David seems to be decided to introduce the unholy attribute >>> named ``class`` in HTML - could it get at least a correct name in >>> reST? >> >> Why do you call it unholy? > > Because you can do something like this: > > <p class="h1">This is the header - disguised as a <b > class="i">paragraph (rendered in italics)</b></p> > > <p class="l1">A list disguised as a paragraph</p> > <table class="p">A paragraph disguised as a table</table> > > I think you get the idea. > > In HTML you can see that this kind of misuse is done all the time. > Misuse of this sort is one of the reasons why the structural idea of > HTML today is more or less forgotten. Why open up that door in reST as > well? Instead I'd plead to fully understand which problem is to be > solved here. If it is that you should be able to do completely your > own thing in reST just as in HTML, then ``class`` is perfect IMHO. Ah. Well, Pythonic practice is to trust the programmer. You can do unholy tricks like that in XML, too, if one wants to behave stupidly. Despite the fact that the *effect* is formatting and formatting is the primary purpose, calling it a "class" is intended to focus the user's mind on grouping, and I think it serves admirably for that. The problem is that reST's variety of input purposes and output formats requires some form of paramterized formatting, but we prefer that people not create new formats willy-nilly. I suspect that as with Python itself, community pressure will keep most misuses out of the mainstream. -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ "In many ways, it's a dull language, borrowing solid old concepts from many other languages & styles: boring syntax, unsurprising semantics, few automatic coercions, etc etc. But that's one of the things I like about it." --Tim Peters on Python, 16 Sep 93 |