|
From: <gr...@us...> - 2002-10-17 08:54:42
|
On Wed, 16 Oct 2002, David Goodger wrote: > [Engelbert] > >>> Should languages.labels become a function which tries, exact case > >>> all lower and if both fails returns the passed text ? > > [David] > >> No. This is another case of "errors should never pass silently". > >> If the label is missing from the language module, it's a bug. > > [Engelbert] > > but maybe a function label() which does not only give a traceback > > but a real error with description. > > No! The "real error" here is that some data is missing from the > mapping, or that the wrong key is being accessed. A traceback is > *absolutely* appropriate. If a traceback occurs, it means there's a > bug in the *code* that needs to be fixed. Docutils Reporter > warnings/errors indicate problems in the *input*. They're completely > different (and incompatible) things. ok, This means, the specification says access language.labels directly without checking for existance of the element. i still think this should be put into code not documentation. def label(self,internal_name): return self.labels[internal_name) gives consistant behaviour over all accesses, because i would not have read this specification, and definately checked for existance. > > >> .. [*] I notice you've just added a German de.py as well. Great, > >> thanks! Unfortunately, even the en.py file it was based on > >> isn't up to date. :-( I'll fix it, probably tomorrow. I think > >> even this is an example of a "silently passing" exception. I'll > >> add some warnings. > > This is done now. i see into de. -- BINGO: professionally create virtual services --- Engelbert Gruber -------+ SSG Fintl,Gruber,Lassnig / A6410 Telfs Untermarkt 9 / Tel. ++43-5262-64727 ----+ |