[Tutor] understanding pydoc try

Alan Gauld alan.gauld at btinternet.com
Thu Aug 30 18:15:29 CEST 2012


On 30/08/12 15:43, John Maclean wrote:

> Thanks. This is a heck of a lot more clearer to me! BNF, huh? Another
> set TLA that I don't need to know ;-)

Actually, BNF is one of those useful skills for any programmer because 
almost every language is 'formally' described using it - at least since 
the days of Algol, for which it was invented.

A simplified version of it is also used to define most command line 
tools and their arguments so its definitely worth learning, at least the 
basics. It can save a lot of typing when you want to precisely specify 
the allowed grammar in a problem.

There are tools which can translate BNF like text into something close 
to code, which is useful if you ever have to define your own programming 
language. Admittedly not something most programmers ever need to do, but 
it does happen occasionally that its the easiest way to solve a problem. 
(The so-called mini-language design pattern)


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list