On Mon, Sep 15, 2008 at 8:14 AM, Joel Bender <jjb5 at cornell.edu> wrote: > Guido van Rossum wrote: > >> ...the syntax for "expression" doesn't allow a comma unless >> it's inside parentheses. > > Perhaps a source of confusion might be that comma seems to act like a 'tuple > join operator' when it is not inside parentheses. Um, the question I was answering specifically asked *where is this in the docs*. > And there is at least one point in the documentation where the comma is > described as an operator: > > <http://docs.python.org/ref/parenthesized.html> > > "Note that tuples are not formed by the parentheses, but rather > by use of the comma operator." Good sleuthing. Since you have found an inconsistency, now all the docs are useless? > As for the assert syntax, I would reuse the 'raise' keyword rather than > 'else': > > assert_stmt ::= "assert" <expression> [ "raise" <expression> ] > > Which emphasizes that the expression is raised as an exception. But it is not -- it is the message passed to the exception constructor! -- --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4