[Python-ideas] 'where' statement in Python?

George Sakkis george.sakkis at gmail.com
Tue Jul 20 20:35:20 CEST 2010


On Tue, Jul 20, 2010 at 8:29 PM, Daniel Stutzbach
<daniel at stutzbachenterprises.com> wrote:

> On Tue, Jul 20, 2010 at 1:16 PM, Guido van Rossum <guido at python.org> wrote:
>>
>> Given the large number of Python users familiar with SQL compared to
>> those familiar with Haskell, I think we'd do wise to pick a different
>> keyword instead of 'where'. I can't think of one right now though.
>
> Taking a cue from mathematics, how about "given"?
>
> c = sqrt(a*a + b*b) given:
>     a = retrieve_a()
>     b = retrieve_b()

Or if we'd rather overload an existing keyword than add a new one,
"with" reads well too.

George



More information about the Python-ideas mailing list