Re: [Python-3000] Assert syntax change...

2008-04-25 Thread Martin v. Löwis
> Independently of that, changing assert to allow surrounding parentheses > (similar to the name list in a from module import name-list style import > statement) would also be convenient for longer expressions or error > messages. But that's already supported... py> assert (1+1+1+1+1+1 ... +1+1+1

Re: [Python-3000] Assert syntax change...

2008-04-25 Thread Martin v. Löwis
> A reasonable conclusion, but needs better reasoning. One could > certainly do an: > assert_stmt::= "assert" (expression ["," expression]) I don't understand that change. Adding parentheses in the EBNF merely adds grouping in the grammar; it doesn't actually change the syntax. P

Re: [Python-3000] Using range()

2008-04-25 Thread Mark Dickinson
On Fri, Apr 25, 2008 at 12:04 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > > Eh, brain explosion from typing too late at night. The experiment I > actually *meant* to try was: > > >>> x = range(0, 2**33, 2) > >>> len(x) > Traceback (most recent call last): > File "", line 1, in > OverflowError:

[Python-3000] range() issues

2008-04-25 Thread Benjamin Peterson
Recently, various discussions about builtin range have come up in the tracker that need to be brought to the attention of the general developer pool: First of all, should the length of range be completely constricted by Py_ssize_t? (issue 2690) Since indexing already is constrained by this, it wou