Proposed new syntax

Gregory Ewing greg.ewing at canterbury.ac.nz
Thu Aug 17 08:47:45 EDT 2017


Steve D'Aprano wrote:
> Do you consider:
>> for foo in bar:
> if baz(foo):
> f(foo) # append to a list, or print, or yield, as needed
>> declarative?

No. But the reason for that is not because it has the word
"for" in it. The reason is that it's made up of statements.
Statements are procedural, expressions are declarative.
> SQL's SELECT ... WHERE is one of the canonical examples of declarative
> programming:

Despite the fact that "select" is a verb in English. :-)
-- 
Greg


More information about the Python-list mailing list

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