From: Paul T. <pau...@gm...> - 2011-10-18 03:03:38
|
On 10/17/11 10:00 PM, Alan G Isaac wrote: > On 10/17/2011 7:07 PM, Paul Tremblay wrote: >> the delimiter does not matter. >> >> If you think otherwise, can you please provide a concrete example > > Parse this: > 32.654,32 > > You won't know how unless I tell you what the delimiter is. > > But of course the whole idea of a "concrete example" misses > the point. A format is useful if I do not need to examine > the data to read it in without ambiguity. Playing around > with the delimiters makes a mess of what could be clean. > > *That* is the role of standards. > To remove such silly ambiguities. > > And *that* is why DSV can never become a *standard*, > but CSV can. And it is why people who care about > scientific data draw the distinction. (Although we > can imagine a DSV-like standard that uses the first > line to specify a delimiter.) > > Alan, it might be better if you actually learned how CSV worked before posting such silliness. You are wasting my time and probably everyone else as well. It is one thing to argue semantics over DSV vs CSV, but quite another to wade into an area about which you (apparently) know nothing. You ask me how to parse a string in which I don't know the delimiter, but you might as well ask me to parse a file when I don't know the path or the encoding. The delimiter must be given There are no standards for CSV. And if a standard gets passed that enforces commas for the delimiter, then that still doesn't change anything. The code would still exist to parse files that use different delimiters, and such files are quite useful. As I've stated before, I actually use space delimited files quite a bit. If you think this suggestion is so outlandish, maybe you should check here: delim : char | "tab" | "space" A one-character string used to separate fields. Defaults to , (comma). May be specified as a Unicode code point; see the unicode directive for syntax details. Where am I getting his instruction that CSV can use spaces and tabs? Why, from the very documentation of resturedtext itself! http://docutils.sourceforge.net/docs/ref/rst/directives.html#id1 Given that python has a whole library that uses different delimiters than a comma; and given that OO and MS do the same; and given that restructuredtext also follows the same practice (calling is CSV and not DSV), perhaps you just might consider that you are wrong? Now maybe I can get back to actually working on problems in restructuredtext, like putting in MathML for the XML writer. Paul |