Is Python a functional programming language?
Paul Rubin
no.email at nospam.invalid
Tue May 11 21:31:03 EDT 2010
Nobody <nobody at nowhere.com> writes:
>> is called an "equation" rather than an "assignment". It declares "x is
>> equal to 3", rather than directing x to be set to 3. If someplace else in
>> the program you say "x = 4", that is an error, normally caught by the
>> compiler, since x cannot be equal to both 3 and 4.
>
> In both ML and Haskell, bindings are explicitly scoped, i.e.
> let x = 3 in ... (Haskell)
I'm not talking about nested bindings. I'm talking about two different
bindings of the same symbol in the same scope:
$ cat meow.hs
x = 3
x = 4
$ ghc meow.hs
meow.hs:2:0:
Multiple declarations of `Main.x'
Declared at: meow.hs:1:0
meow.hs:2:0
More information about the Python-list
mailing list