Re: List index method for complex list item types?
- From: Steven D'Aprano <steve@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 31 Dec 2005 14:43:18 +1100
On Fri, 30 Dec 2005 18:56:47 -0800, techiepundit wrote:
> Mike,
>
> I'm trying to figure out dictionaries using the documentation. Clicking
> on "dictionary type" takes me to "2.3.8 Mapping Types -- classdict". Is
> that the documentation for the dictionary type? If so, I do not see an
> "append" or "add" or "insert" method defined in the list of methods on
> that page.
No you don't. Why do you think dicts need one?
> Here's what they list:
>
> Operation Result Notes
> len(a) the number of items in a
> a[k] the item of a with key k (1)
> a[k] = v set a[k] to v
x = a[k] # get the value in dict a with key k
a[k] = x # set the value in dict a with key k
What more do you need?
--
Steven.
.
- References:
- List index method for complex list item types?
- From: techiepundit
- Re: List index method for complex list item types?
- From: Mike Meyer
- Re: List index method for complex list item types?
- From: techiepundit
- List index method for complex list item types?
- Prev by Date: questions about py2exe and wax
- Next by Date: Re: List index method for complex list item types?
- Previous by thread: Re: List index method for complex list item types?
- Next by thread: Re: List index method for complex list item types?
- Index(es):
Relevant Pages
|