On Aug 26, 11:52 am, Erik Max Francis <[EMAIL PROTECTED]> wrote:
> ++imanshu wrote:
> >     Wouldn't it be nicer to have 'in' return values (or keys) for both
> > arrays and dictionaries. Arrays and Dictionaries looked so similar in
> > Python until I learned this difference.
>
> It's because dealing with keys makes far more sense, since that's how
> the dictionary data structure works.  If you're doing this an awful lot
> -- whether testing for inclusion or iterating -- then you're probably
> using the wrong data structure.

Thanks for the detailed replies. Python seems to be taking the
pragmatic approach here instead of the pure one. And yes it makes more
sense.

Thanks,
++imanshu

>
> --
> Erik Max Francis && [EMAIL PROTECTED] &&http://www.alcyone.com/max/
>   San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
>    Well I have been puppetized / Oh how I have compromised
>     -- Lamya

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to