Re: list IndexError
From: Steven Bethard (steven.bethard_at_gmail.com)
Date: 12/23/04
- Next message: Steven Bethard: "Re: Keyword arguments - strange behaviour?"
- Previous message: ekyungchung_at_gmail.com: "Re: error problems for import some copora with nltk"
- In reply to: Mike C. Fletcher: "Re: list IndexError"
- Next in thread: Grant Edwards: "Re: list IndexError"
- Reply: Grant Edwards: "Re: list IndexError"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Dec 2004 16:15:37 GMT
Mike C. Fletcher wrote:
> Ah, my mistake, I missed the [:] after the source argument that was
> taking a copy... which brings up the question, how many other people
> would miss it?
Too many. This is why I greatly prefer
list(lst)
to
lst[:]
It's also clearer to me. Do I really want a "slice" of the list? No, I
want a list copy of the list...
Steve
- Next message: Steven Bethard: "Re: Keyword arguments - strange behaviour?"
- Previous message: ekyungchung_at_gmail.com: "Re: error problems for import some copora with nltk"
- In reply to: Mike C. Fletcher: "Re: list IndexError"
- Next in thread: Grant Edwards: "Re: list IndexError"
- Reply: Grant Edwards: "Re: list IndexError"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|