homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zseil
Recipients
Date 2006年05月16日.19:09:19
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I tried to update the reference manual to the current
Python syntax. Some things are still missing, most
notably the yield expression. Detailed description
of changes below. I can also attach the
generated webpages, if someone is interested.
Expressions
===========
List Displays
-------------
Reordered the rules so that the style is
consistent with the rest of the manual. Separated
listmaker into expression_list and
list_comprehension, for better readability.
Replaced "expression_list" between "for" and "in"
with "target_list". See this thread for details:
http://mail.python.org/pipermail/python-dev/2006-April/064264.html
The only thing missing is old_lambdadef.
Generator Expressions
---------------------
Simmilar as above.
Calls
-----
Fixed the latex syntax (somebody forgot to remove
a line when generators were introduced). Replaced
test with expression. Fixed allowed positions for
commas (func(*args,) is not allowed).
Boolean operations
------------------
Restructured the new conditional expression so
that it is more readable.
Simple Statements
=================
Augmented assignment statements
-------------------------------
Removed comments from "productionlist" macro,
since they broke the generated grammar.txt file.
Removed empty groups that are not needed anymore,
since automatic conversion to guillemets was
disabled. Unfortunately the escaped operator
characters would still need manual fixing in the
grammar.txt file.
The print statement
-------------------
Removed all uses of the "optional" macro and
replaced them with sqare brackets, since it broke
the generated grammar.txt file.
The import statement
--------------------
Replaced all invalid uses of name with identifier.
Added relative import notation to the grammar
section.
Description of relative imports is still needed.
The exec statement
------------------
Corrected a minor mistake, since
exec "a = 1" or "a = 2"
is not valid Python syntax.
Added a (commented out) section about a strange feature
(you can already treat exec as a function) that should
IMHO be included in documentation and its use encouraged
over the current notation.
Compound statements
===================
The with statement
------------------
Added missing macro.
Function definition
-------------------
Cleaned up "parameter_list" so that it is correct
and expresses all the restrictions, but is still
easier to understand (I hope).
Still needed
------------
Yield became an expression in version 2.5, but this
is not documented.
History
Date User Action Args
2007年08月23日 15:48:52adminlinkissue1489771 messages
2007年08月23日 15:48:52admincreate

AltStyle によって変換されたページ (->オリジナル) /