RE: Re: [Prothon-commits] rev 232 - trunk/src
"Mark Hahn" <[email protected]> Wed, 31 Mar 2004 11:12:52 -0800
| Newsgroups | gmane.comp.lang.prothon.devel |
|---|---|
| Message-ID | <[email protected]> |
> if I return a tuple of key,value, and do: > for key in dict: > I still get just the key? No, you get a variable called key that is a tuple. -----Original Message----- From: Ben Collins [mailto:[email protected]]On Behalf Of Ben Collins Sent: Wednesday, March 31, 2004 11:00 AM To: Mark Hahn Cc: [email protected] Subject: Re: [Prothon-dev] Re: [Prothon-commits] rev 232 - trunk/src On Wed, Mar 31, 2004 at 09:22:03AM -0800, Mark Hahn wrote: > This dict generator should return a tuple of key,value pairs. Then to use > it you have to say: > > for key,value in dict: > > The for loop supports tuples. Ah, ok. So if I return a tuple of key,value, and do: for key in dict: I still get just the key? -- Debian - http://www.debian.org/ Linux 1394 - http://www.linux1394.org/ Subversion - http://subversion.tigris.org/ WatchGuard - http://www.watchguard.com/