why not "'in' in 'in'"?
Grant Griffin
not.this at seebelow.org
Thu Jun 13 09:27:27 EDT 2002
Duncan Booth wrote:
>
> Grant Griffin <not.this at seebelow.org> wrote in
> news:3D082A62.CF800C75 at seebelow.org:
>
> >> Grant Griffin wrote:
> >> This peculiar lack of generality seems a bit (dare I say
> >> it?) "non-Pythonic".
> <lots of snips and then>
> > But anyway, let's "just say no" to the tuple case rather than confuse
> > ourselves; let's just make the string version of "in" a special case.
>
> I see a slight lack of consistency in your approach here. First you
> complain that the way 'in' works lacks generality, then when everyone
> points out that to make it work the way you would expect would make it
> break on lists or tuples you suggest special casing.
(You forgot "QED" <wink>.)
>
> The Pythonic way is to maintain generality, not to introduce special cases.
See, that's where we bump into "practicality beats purity".
note-that-every-one-of-tim's-principles-is-subjective-ly y'rs,
=g2
--
_____________________________________________________________________
Grant R. Griffin g2 at dspguru.com
Publisher of dspGuru http://www.dspguru.com
Iowegian International Corporation http://www.iowegian.com
More information about the Python-list
mailing list