Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > how to clear up a List in python?

Reply
Thread Tools

how to clear up a List in python?

 
 
Steve Holden
Guest
Posts: n/a
 
      05-26-2006
vbgunz wrote:
>>I guess Fredrik's message was more along the lines of ``don't try to
>>"help" others after a week or two toying with the language because you
>>might be offering disservice, despite your good intentions; leave this
>>to more experienced users``. The words might have been a bit harsher
>>but that's just his style; you'll get used to it if you hang around
>>here often.

>
>
> I much rather stand corrected than to silently remain ignorant. I take
> revision of my solution for all it's worth but to be belittled without
> correction is arrogant and unnecessary. I've been working with Python
> for several months now and I feel I know plenty *but* I am still
> learning.
>
> I personally never had to clear a list. I never thought of Roberts
> answer and my reasoning is in Roberts message. In the end I stood
> correct because Robert was nice enough to answer two birds with one
> stone. Fredrik on the other hand had nothing positive to add and his
> message seemed gestapo.
>
> Where I come from and how I grew up is quite simple. A wrong answer is
> better than no answer and a worthless remark is worth garbage. Why?
> Because no right answer is gospel and no answer no matter how dumb is
> cause for discourtesy. I tried and thats the bottom line.
>

Frankly I can't agree that a wrong answer is better than no answer,
despite my frequent strategy of opining that something is impossible
just so the cleverer denizens of c.l.py will prove me wrong. A wrong
answer requires correction by people who know the "right" answer, so you
end up consuming group bandwidth and mindshare unnecessarily.

I am assuming the part of Fredrik's post that "seemed gestapo" to you
is """if you don't know how to do things, you don't need to post."""

Please read this carefully, as Fredrik's use of language is precise: he
doesn't say you *shouldn't* post, he says you don't *need to*. This is
good advice, because posting a lame solution too quickly, while
reflecting an earnest and praiseworthy desire to help, can often lead to
trouble with some of the less patient members of our community.

You did indeed try, and I give you points for that. I'd have given you
more points for a further response along the lines of """[Smacks head!]
of course, my solution wasn't very clever, was it?"

Later in this thread (the time machine tells me) you go on to say:

> I bet you enjoy stealing candy from babies and dunging on the little
> guy every chance you get. You're suppose to be a role model in this
> community? Your temper tantrum and unrelenting 'look at me look at me
> i'm bigger and better' machismo attitude is nothing more than a decoyed
> ploy set out by a deluded megalomaniac. You're promoting Python or the
> fact that you're the son of Zeus and Hera? You're the worse sore losing
> cry baby I've ever witnessed on the net in my ten years here...
> pathetic for sure...
>


Now that's the kind of behaviour I work hard to discourage on this
newsgroup (and everywhere else I can, come to that: you may have noticed
an improvement in President Bush's response to press questions about
Iraq yesterday).

As it happens, although Fredrik and I have corresponded for almost ten
years we have only just met this week at the Need for Speed sprint. I
can tell you the man is a pussy cat, and any offense you might feel is
due to your wounded pride, not his desire to hurt. So go Google for
"egoless programming", take your knocks, and learn to simply apologise
when you are wrong and get on with your life.

The ability to do this has stood me in good stead for many years. I am
hoping against hope that you won't, like Oscar Wilde, feel that "The
only thing you can possibly do with good advice is pass it on". Time
alone will tell. A hint:

http://www.codinghorror.com/blog/archives/000584.html

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

 
Reply With Quote
 
 
 
 
vbgunz
Guest
Posts: n/a
 
      05-26-2006
Steve, I have no qualm with Fredrik over this '''if you don't know how
to do things, you don't need to post.''' but this ''' if you know why
this is about the dumbest way to do what you're doing, and you're
posted this on purpose, you really need to grow up.'''.

The problem was I did post it on purpose, but not with the intent to
mess anyone up over it. To top it off, this thread was done and over
with (the end) with Roberts reply that came in immediately after mines.
I acknowledged his was best and that I *learned* from it.

It just seemed Fredriks response was an attack on me and I did take it
personally because I tried my best. Sometimes I try to give back but to
try and make me regret it is poor communication if the best intent is
to advise me on how things are done and not done around here...

Its all good. I live and I learn...

 
Reply With Quote
 
 
 
 
Steve Holden
Guest
Posts: n/a
 
      05-26-2006
vbgunz wrote:
>>You perhaps shouldn't become so excited. Next time, if you're not sure of
>>the correctness of your solution, try to wait a bit before posting it,
>>and see if someone other comes up with the same thing you would have posted.

>
>
> George, if Frederik's first reply was replaced with yours chances are
> this little waste of time would have never had taken place. I am not an
> animal and I am capable of understanding my mistakes but trying to
> embarass me and belittle me in front of all of my peers here when all I
> tried to do was help is absolutely pathetic the first time around.
>

That's "Georg", by the way ...

> I don't try to come off as a know it all here and I don't feel I should
> post a gospel warning label on my help signature but Fredrik could have
> delivered his message in a much better tone. I too am learning Python
> and if maybe my answer was not evident enough of that then how smart is
> Fredrik to persecute me for it?
>

Man, if you think *that* was persecution don't *ever* take up Lisp or
Perl, where they will eat you alive just for not knowing something.

> I don't wish to question Fredriks knowledge or his position in the
> whole scheme of Python but to disrespect me in the name of arrogance
> and call it just is a mislabel. I don't wish to carry on with this, I
> don't... I just have no love for a bully and Fredrik is proving himself
> to be just that.
>

No he isn't. Like Python itself this group is for consenting adults, and
you are letting your emotions get in the way of an adult response.

> Good day George!
>

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

 
Reply With Quote
 
chris brat
Guest
Posts: n/a
 
      05-26-2006
Cant we all just get along ?



Sorry, couldn't resist.

 
Reply With Quote
 
vbgunz
Guest
Posts: n/a
 
      05-26-2006
I read the ten commandments. I enjoyed the link. I see my mistakes.
Thank you.

 
Reply With Quote
 
Luis Armendariz
Guest
Posts: n/a
 
      05-26-2006
vbgunz wrote:
> Steve, I have no qualm with Fredrik over this '''if you don't know how
> to do things, you don't need to post.''' but this ''' if you know why
> this is about the dumbest way to do what you're doing, and you're
> posted this on purpose, you really need to grow up.'''.


Well, given that you did post it on purpose and had no "intent to mess
anyone up over it", it is clear that the antecedent in Fredrik's
if-statement is not satisfied and therefore your mind should've skipped
the consequent statement when reading his response. Why get so upset
about something that didn't even apply to you?

-Luis
 
Reply With Quote
 
vbgunz
Guest
Posts: n/a
 
      05-26-2006
> Well, given that you did post it on purpose and had no "intent to mess
> anyone up over it", it is clear that the antecedent in Fredrik's
> if-statement is not satisfied and therefore your mind should've skipped
> the consequent statement when reading his response. Why get so upset
> about something that didn't even apply to you?


I wish I could've intepreted it like that... I guess that is one of the
evils of being human. the uncanny ability to intepret ambiguous
understatements and then say fork it when technically you're correct...
it really did not apply to me... The evil of being human I suppose

I apologize to Fredrik for my outburst but would like to request that
next time a better suited address be in order even if in doubt. Not
everyone is aware of egoless programming...

 
Reply With Quote
 
Steve Holden
Guest
Posts: n/a
 
      05-26-2006
vbgunz wrote:
> I read the ten commandments. I enjoyed the link. I see my mistakes.
> Thank you.
>

A genuine pleasure. Welcome to comp.lang.python.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

 
Reply With Quote
 
linnorm@gmail.com
Guest
Posts: n/a
 
      05-26-2006
The original post only mentions deleting the values in the list, not
the list itself. Given that you want to keep the list and just ditch
the values it contains I'd go with:

list1 = []

-Linnorm

 
Reply With Quote
 
Mel Wilson
Guest
Posts: n/a
 
      05-26-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> The original post only mentions deleting the values in the list, not
> the list itself. Given that you want to keep the list and just ditch
> the values it contains I'd go with:
>
> list1 = []


Depends what you mean by "keep the list". Consider

class C (object):
def __init__ (self, things):
self.things = things

a = range (5)
b = C (a)
a = []
print b.things

d = range (5)
e = C (d)
d[:] = []
print e.things



These are very different.
Mel.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Response.Clear() doesn't clear David ASP .Net 2 01-31-2008 08:32 PM
Unrecognized element 'add' after <clear></clear> InvalidLastName ASP .Net Web Services 3 03-06-2007 03:07 AM
Does list.clear() delete the objects in the list? If not, what is the correct method? Michael Jasn C++ 1 11-01-2004 10:06 AM
Clear Browser History List =?Utf-8?B?RGF2aWQ=?= ASP .Net 1 02-19-2004 06:45 PM



Advertisments