Re: [Tutor] understanding pydoc try

2012-08-30 Thread Alan Gauld
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

Re: [Tutor] understanding pydoc try

2012-08-30 Thread John Maclean
On 08/30/2012 05:15 PM, Alan Gauld wrote: 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 'formal

Re: [Tutor] understanding pydoc try

2012-08-30 Thread Alan Gauld
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 th

Re: [Tutor] understanding pydoc try

2012-08-30 Thread Dave Angel
On 08/30/2012 11:26 AM, Steve Willoughby wrote: > On 30-Aug-12 08:22, Dave Angel wrote: >> On 08/30/2012 10:43 AM, John Maclean wrote: >>> On 08/30/2012 03:05 PM, Dave Angel wrote: >>> >>> Thanks. This is a heck of a lot more clearer to me! BNF, huh? Another >>> set TLA that I don't need

Re: [Tutor] understanding pydoc try

2012-08-30 Thread Steve Willoughby
On 30-Aug-12 08:22, Dave Angel wrote: On 08/30/2012 10:43 AM, John Maclean wrote: On 08/30/2012 03:05 PM, Dave Angel 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 ;-) I learned BNF in about 1972. I've used about 35 languag

Re: [Tutor] understanding pydoc try

2012-08-30 Thread Dave Angel
On 08/30/2012 10:43 AM, John Maclean wrote: > On 08/30/2012 03:05 PM, Dave Angel 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 ;-) > I learned BNF in about 1972. I've used about 35 languages since (not counting hobby on

Re: [Tutor] understanding pydoc try

2012-08-30 Thread John Maclean
On 08/30/2012 03:05 PM, Dave Angel wrote: On 08/30/2012 09:30 AM, John Maclean wrote: What does the first line from `pydoc try` actually mean? This does not look like the syntax that one is supposed to use. try_stmt ::= try1_stmt | try2_stmt You're looking at the first of three BNF statement

Re: [Tutor] understanding pydoc try

2012-08-30 Thread Steven D'Aprano
On 30/08/12 23:30, John Maclean wrote: What does the first line from `pydoc try` actually mean? This does not look like the syntax that one is supposed to use. try_stmt ::= try1_stmt | try2_stmt That's a description of the Python grammar in some variation of Backus-Naur Form. In English, it

Re: [Tutor] understanding pydoc try

2012-08-30 Thread Dave Angel
On 08/30/2012 09:30 AM, John Maclean wrote: > What does the first line from `pydoc try` actually mean? This does not > look like the syntax that one is supposed to use. > > try_stmt ::= try1_stmt | try2_stmt > You're looking at the first of three BNF statements. BNF (Backus Naur Form, or somethin

Re: [Tutor] understanding pydoc try

2012-08-30 Thread Michael Janßen
On 30 August 2012 15:30, John Maclean wrote: > What does the first line from `pydoc try` actually mean? This does not > look like the syntax that one is supposed to use. > > try_stmt ::= try1_stmt | try2_stmt > looks like part of the python language reference. It goes a little further and expla

[Tutor] understanding pydoc try

2012-08-30 Thread John Maclean
What does the first line from `pydoc try` actually mean? This does not look like the syntax that one is supposed to use. try_stmt ::= try1_stmt | try2_stmt I can write simple statements as shown below, but I want to actually understand what I am doing. try: import io print("import