Is Python a functional programming language?

Chris Rebert clp2 at rebertia.com
Tue May 11 15:25:11 EDT 2010


On Tue, May 11, 2010 at 11:13 AM, Terry Reedy <tjreedy at udel.edu> wrote:
> On 5/11/2010 7:11 AM, Lawrence D'Oliveiro wrote:
>> In message<7xvdavd4bq.fsf at ruckus.brouhaha.com>, Paul Rubin wrote:
>>
>>> Python is a pragmatic language from an imperative tradition ...
>>
>> I thought the opposite of “functional” was “procedural”, not “imperative”.
>> The opposite to the latter is “declarative”. But (nearly) all procedural
>> languages also have declarative constructs, not just imperative ones
>> (certainly Python does).
>
> Python has only two: 'global' and now 'nonlocal'.
> There are also two meta-declarations: the coding cookie (which would/will go
> away in an entirely unicode world) and future imports (which are effectively
> temporarily gone in 3.x until needed again).
>
> Newbies sometimes trip over def and class being imperative (executable)
> statments rather than declarations.

Er, declarative programming has nothing to do with variable declarations.
http://en.wikipedia.org/wiki/Declarative_programming

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list