Fwd: [Tutor] interpreting error messages

Max Noel maxnoel_fr at yahoo.fr
Thu Oct 7 01:02:00 CEST 2004


(whoops, I made a mistake and only sent the message to Jacob. Sorry.)


Begin forwarded message:

> From: Max Noel <maxnoel_fr at yahoo.fr>
> Date: October 7, 2004 00:00:25 BST
> To: "Jacob S." <keridee at jayco.net>
> Subject: Re: [Tutor] interpreting error messages
>
>
> On Oct 6, 2004, at 23:21, Jacob S. wrote:
>
>>
>> This means that you are trying to loop through an object that 
>> absolutely
>> cannot be expressed as a list. For example, lists can be turned into 
>> lists,
>> tuples to lists, strings to lists, etc. Dictionaries, classes, 
>> functions,
>> etc. cannot be turned into lists.
>
> 	Dictionaries can be turned into lists.
>
> >>> a = {'a': 1, 'b': 2, 'blah': 3}
> >>> for i in a:
> ...     print i
> ...
> a
> blah
> b
>
> 	Aside from that, you're right.
>
> -- Wild_cat
> maxnoel_fr at yahoo dot fr -- ICQ #85274019
> "Look at you hacker... A pathetic creature of meat and bone, panting 
> and sweating as you run through my corridors... How can you challenge 
> a perfect, immortal machine?"
>
>
-- 
maxnoel_fr at yahoo dot fr -- ICQ #85274019
"Look at you hacker... A pathetic creature of meat and bone, panting 
and sweating as you run through my corridors... How can you challenge a 
perfect, immortal machine?"



More information about the Tutor mailing list