473,486 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Python is not [yet] Considered Harmful

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]
Jul 18 '05 #1
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

Jul 18 '05 #2
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.
Jul 18 '05 #3
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
Jul 18 '05 #4
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.
Jul 18 '05 #5
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.

Jul 18 '05 #6
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]

Jul 18 '05 #7
"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
Jul 18 '05 #8

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
--
&quot;The Python Guy&quot;
Posted via http://dbforums.com
Jul 18 '05 #9
SB
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.
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
18799
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...
25
2887
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)
11
2251
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...
47
3418
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...
72
5467
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,...
37
2528
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...
0
7100
marktang
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,...
0
6964
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...
0
7126
Oralloy
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,...
0
7175
jinu1996
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...
1
6842
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...
0
5434
agi2029
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,...
1
4865
isladogs
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...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
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 ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.