Python's BNF

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri Feb 29 17:54:05 EST 2008


En Fri, 29 Feb 2008 15:01:49 -0200, <MartinRinehart at gmail.com> escribió:

> _OFILE, by the way, is the output file. It's contract with the rest of
> the module was
> to be available for writing to anyone with data to write. I use the
> Java convention
> of ALLCAPS for naming things that I would declare as CONSTANT if
> Python had
> such a declaration.

(Uhm... I'd consider _OFILE a variable, not a constant!)
What if you want to generate many files, maybe one per declaration? You  
might want to reuse some of those functions, but you can't do that with a  
global _OFILE.

About the generated page: I think it would be more useful if each symbol  
links to its definition, instead of showing an alert(). This way it's  
easier to navigate the tree, specially with complex declarations. You can  
place the current text into a "title" attribute and most browsers will  
show it as a tooltip.
Also it would be nice if at least it were valid HTML, and semantically  
correct - using  DL, DT and DD tags instead of tables, by example.

-- 
Gabriel Genellina




More information about the Python-list mailing list