nick coughlan wrote:
On Tue, Jul 20, 2010 at 7:50 PM, Alex Light <email@example.com> wrote:Incorrect. Yes, you are misunderstanding:
> Carl M. johnson wrote:
>>2.) What happens in this case:
>>x = y given:
>> return "???"
>>Do we just disallow return inside a given? If so, how would the parser
>>know to allow you to do a def inside a given?
> i think so because unless i am misunderstanding something the only allowed
> in a 'given' block would be of the type:
> a_variable = an_expression
On Tue, Jul 20, 2010 at 3:13 PM, Nick Coghlan <firstname.lastname@example.org> wrote:
> On Wed, Jul 21, 2010 at 6:13 AM, Alex Light <email@example.com> wrote:
>> i would use as because this whole where clause acts very similarly to a<snip>
>> context manager in that it sets a variable to a value for a small block
> No, the idea is for the indented suite to be a perfectly normal suite
> of Python code. We want to be able to define functions, classes, etc
> in there. Inventing a new mini-language specifically for these clauses
> would be a bad idea (and make them unnecessarily hard to understand)
> Nick Coghlan | firstname.lastname@example.org | Brisbane, Australia
Did you not read Nick's reply yet when you wrote this, or...?