On May 14, 11:58 am, Matthew Woodcraft
<[EMAIL PROTECTED]> wrote:
> I V <[EMAIL PROTECTED]> wrote:
>
> > I hadn't heard of operator.truth before. Does it do anything different
> > from bool(x) ?
>
> Not really. It was occasionally useful before the bool type existed;
> now it's just a leftover.
>
I V <[EMAIL PROTECTED]> wrote:
> I hadn't heard of operator.truth before. Does it do anything different
> from bool(x) ?
Not really. It was occasionally useful before the bool type existed;
now it's just a leftover.
-M-
--
http://mail.python.org/mailman/listinfo/python-list
On May 13, 7:46 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On May 13, 6:09 pm, Eric Anderson <[EMAIL PROTECTED]> wrote:
>
> > I mainly work in other languages (mostly Ruby lately) but my text
> > editor (Scribes) is python. With python being everywhere for dynamic
> > scripting I thought I would r
On May 13, 6:09 pm, Eric Anderson <[EMAIL PROTECTED]> wrote:
> I mainly work in other languages (mostly Ruby lately) but my text
> editor (Scribes) is python. With python being everywhere for dynamic
> scripting I thought I would read the source to learn the language
> better (I've gone through som
On Wed, 14 May 2008 00:38:44 +0200, Christian Heimes wrote:
> Eric Anderson schrieb:
>> Seems like unnecessary code but obviously I know nothing about Python.
>
> Correct, the truth example isn't a good example. "if argv" is better.
I hadn't heard of operator.truth before. Does it do anything dif
Eric Anderson schrieb:
> Seems like unnecessary code but obviously I know nothing about Python.
Correct, the truth example isn't a good example. "if argv" is better.
But you can write interesting things with the operator module. For example
>>> import operator
>>> def fac(x):
... return reduc
I mainly work in other languages (mostly Ruby lately) but my text
editor (Scribes) is python. With python being everywhere for dynamic
scripting I thought I would read the source to learn the language
better (I've gone through some basic tutorials but I always prefer to
learn from real source).
So