map(lambda f: f(1), [lambda x: x + 1 for i in range(3)])
Oh, OK, it was a typo (1 instead of i). I take it all back (for now).
It was an honest mistake, not a troll! Still, I think it should
be [1, 2, 3] instead of [3, 3, 3] 9 1558
You can't just pull up one example and call a language "harmful" from it, no
matter how maddeningly unintuitive it is. If you could, ALL languages would be
harmful (both computer and natural languages!).
- Kef
On Sun, 26 Oct 2003 22:56:19 -0800 (PST) mi*****@ziplip.com wrote: map(lambda f: f(1), [lambda x: x + 1 for i in range(3)])
Oh, OK, it was a typo (1 instead of i). I take it all back (for now).
It was an honest mistake, not a troll! Still, I think it should be [1, 2, 3] instead of [3, 3, 3]
A honest mistake would be a post to c.l.python saying,
"map(lambda f: f(1), [lambda x: x + 1 for i in range(3)]) returns
[2,2,2] rather than [1,2,3] like I'd expect, what's going on here?"
I really don't know which community you are trying to injure more:
Haskell or Python.
At any rate, either you are a troll and none of the involved want you
here, or you aren't and you should cease posting for a few months
so you stop looking like one.
Darius wrote: On Sun, 26 Oct 2003 22:56:19 -0800 (PST) mi*****@ziplip.com wrote: [snip trollisms]
At any rate, either you are a troll and none of the involved want you here, or you aren't and you should cease posting for a few months so you stop looking like one.
He is a troll, no question. Check his recent postings for confirmation.
-Peter mi*****@ziplip.com wrote in message news:<F5**************************************@zip lip.com>... It was an honest mistake, not a troll! Still, I think it should be [1, 2, 3] instead of [3, 3, 3]
I don't think you understand what a troll is. Troll is someone
who posts any of the following:
1. "Python is Considered Harmful" (given it's highly readable syntax,
great libraries and high dynamicity, I can't see how a single
feature could make Python 'harmful'. The title could've just been
"Unexpected behaviour of closures inside list comprehensions")
2. "I present to you the final and ultimate proof of Python's
brain-damage" (again, a needless attack.. which turned against
yourself though)
3. "All this Python bashing is starting to feel like mocking
a retarded child..." (this doesn't need explanation, I hope)
And look, you posted all three of them in a single message!
Well, your typo gave us a good laugh nevertheless ;)
If you want [1, 2, 3], try:
map(lambda f: f(1), [lambda x, i=i: x + i for i in range(3)])
i=i will make a local variable i within the lambda so that
each lambda will refer to their own i instead of sharing the
same i from the outer scope. mi*****@ziplip.com wrote: map(lambda f: f(1), [lambda x: x + 1 for i in range(3)])
Oh, OK, it was a typo (1 instead of i). I take it all back (for now).
It was an honest mistake, not a troll!
Haha, and why is this posted to newsgroups dedicated
to languages completely unrelated to python?
You're a troll and I am feeding you. Your stupidity is however
large enough so it does not need to be pointed out really. I
won't be doing it again.
Ta-ta.
--
Thomas.
I have done stupid things, after all I'm a human being. But I have
never done anything like this before. I mean saying that I have the
proof that a language doesn't work because of a piece of code isn't
giving me the results I'm expecting. The first thing I would think is
that it was my mistake and try to find it by myself. But if I don't see
any error, then I would formulate a polite question instead of insulting
the python developers, who for sure have done a hard work giving
us such nice language. I'm sure you'd have received a better answer.
But now, a lot of people is upset at you because of your arrogance.
So, you had better change your attitude and read something about
Netiquette.
By the way, since the subject is python related, I don't see the need
to do a crossposting. It just seems like if you wanted to catch the
attention of as many people as you can. Oh, OK, it was a typo (1 instead of i). I take it all back (for now).
It was an honest mistake, not a troll! Still, I think it should be [1, 2, 3] instead of [3, 3, 3]
"Josef Meile" <jm****@hotmail.com> writes: By the way, since the subject is python related, I don't see the need to do a crossposting. It just seems like if you wanted to catch the attention of as many people as you can.
It's a standard crossposting troll practice - he wants the Pythonistas
to say something negative about Haskell, to make the Haskellistas
flame us back, ad infinitum.
I guess it can be a fun sociological experiment, if you are posting
pseudonymously.
--
Ville Vainio http://www.students.tut.fi/~vainio24
I think it is you who are brain-damaged, not python.
Every computer language has its pros and cons, it does
not befit a good programmer to post flame baits on
any comp.lang.x newsgroup just because a piece of code
he wrote worked in a way he did not expect using the
language 'x'.
If the idea is to promote haskell, this is certainly not the
way I would go about it.
Try googling for the word 'netiquette', just might save you.
-Anand
--
"The Python Guy"
Posted via http://dbforums.com
This post is interesting, and raise an issue (unfortunately already
known) about scopes in Python. But bad faiths occurs when the poster
forget that :
1) variable capture is not an error, it can be linked with some topics
of computer science in one hand, and well known and considered useful
programming construction in the other hand (say, genuine exceptions).
Old timer's LISP used dynamic contexts, and has not been reported as
causing brain damage (AFAIK).
2) Now, a little bad faith from my own... Could you imagine the number
of people suffering this kind of brain damage (caused by the heavy use
of monads), which goes around explaining to people that imperative
programming is useless, and that only them knows the truth ??? You
seem to be part of them...
SB. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brandon J. Van Every |
last post by:
What's better about Ruby than Python? I'm sure there's something. What is
it?
This is not a troll. I'm language shopping and I want people's answers. I
don't know beans about Ruby or have...
|
by: mike420 |
last post by:
Ladies and Gentlemen,
I present to you the final and ultimate proof of Python's
brain-damage:
As you may remember,
flist =
for i in range(3)
|
by: brainsucker |
last post by:
Hi My name is Juan Carlos Rodrigo, and I love Python.
It is the most impressive and usefull language that
I have ever seen.
I am studing, at http://www.uoc.edu, an Information
Technology...
|
by: Kenneth McDonald |
last post by:
Is there any emerging consensus on the "best" UI for toolkit. Tk
never quite made it but from what I can see, both qt and wxWin are
both doing fairly well in general. I'm already aware of the...
|
by: Gregory Petrosyan |
last post by:
Please visit http://www.python.org/peps/pep-0204.html first.
As you can see, PEP 204 was rejected, mostly because of not-so-obvious
syntax. But IMO the idea behind this pep is very nice. So,...
| |
by: Michele Simionato |
last post by:
At work we are shopping for a Web framework, so I have been looking at
the available options
on the current market. In particular I have looked at Paste and Pylons
and I have written my...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |