Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
list index()
- From: carsten at uniqsys.com (Carsten Haese)
- Subject: list index()
- Date: Thu, 30 Aug 2007 21:15:27 -0400
On Fri, 2007-08-31 at 12:57 +1200, Lawrence D'Oliveiro wrote:
> In message <mailman.158.1188499243.28954.python-list at python.org>, Steve
> Holden wrote:
>
> > But why would you want to ignore built-in support like "value in dict"?
>
> Because a function can be passed as a value in its own right, a built-in
> construct cannot.
...and that's why we have operator.contains():
>>> import operator
>>> help(operator.contains)
Help on built-in function contains in module operator:
contains(...)
contains(a, b) -- Same as b in a (note reversed operands).
--
Carsten Haese
http://informixdb.sourceforge.net
- References:
- list index()
- From: zzbbaadd at aol.com
- list index()
- From: Bruno Desthuilliers
- list index()
- From: zzbbaadd at aol.com
- list index()
- From: zzbbaadd at aol.com
- list index()
- From: Lawrence D'Oliveiro
- list index()
- Prev by Date: So what exactly is a complex number?
- Next by Date: status of Programming by Contract (PEP 316)?
- Previous by thread: list index()
- Next by thread: list index()
- Index(es):