[Tutor] understanding pydoc try

Alan Gauld alan.gauld at btinternet.com
Thu Aug 30 18:44:34 CEST 2012


On 30/08/12 17:21, John Maclean wrote:

> My main issue is that I am a sysadmin and not a programmer. I am aware
> of pydoc but not of BNF. So I was a bit taken aback when I saw the BNF
> syntax. It was obvious to me that syntax of the try statements were not
> python syntax but had no clue how to parse it. BTW - where in pydoc is
> it mentioned, (or anywhere else for that matter), to refer to BNF?

If you are writing (or reading!) code you are a programmer! :-)

Michael already gave a link to the notation page on the web site which 
does explicitly mention BNF but, to be honest it would not be surprising 
if it didn't. It would be like specifically saying that a web page was 
written in HTML, nowadays its often just assumed that anyone creating 
web pages knows about HTML... Similarly languages are usually specified 
in some approximation of BNF.

The link was:
http://docs.python.org/reference/introduction.html#notation


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



More information about the Tutor mailing list