Syntax help

Jean-Michel Pichavant jeanmichel at sequans.com
Wed Jan 26 05:05:51 EST 2011


sl33k_ wrote:
> How to read syntax like this given in the documentation of python?
> (Newbie)
>
> defparameter   ::=  parameter ["=" expression]
>
> http://docs.python.org/reference/compound_stmts.html#function-definitions
>   

Just in case you're about to learn python using these defintions:

Nobody's learning a syntax that way.
They are not meant to be understood by newcommers. They are accurate, 
non amiguous, exhaustive definition of the syntax. Some people familiar 
with working on grammars may effectively use it, but the majority of the 
people will prefer a fine explanation with examples (provided right 
after the grammar defintions).

Unless you really need to work on some python parsing stuff, you can 
just ignore them.

JM



More information about the Python-list mailing list