not in

rihad rihad at mail.ru
Mon Jan 21 13:15:06 EST 2002


On Mon, 21 Jan 2002 17:46:01 +0100, "Alex Martelli" <aleax at aleax.it>
wrote:

>"rihad" <rihad at mail.ru> wrote in message
>news:aibo4u48sa16v8fvrjsrrip9coc47n2108 at 4ax.com...
>    ...
>> >the semantics of "not a and not b" had better be basically the same
>> >as those of "not (a or b)".  So what?  Would you can "not a and not b"
>> >``new syntax''?  I suspect I'm missing your point -- what IS it?
>> >
>> Sorry (language barrier?). By `new' I meant that `not in' is a
>> language construct, just as if it were a distinct not_in/is_not
>> keyword. IOW, `new' eq `not necessary'. :)
>
>Ah, just like, say, unary-plus (strictly non-necessary), binary
>minus (non-necessary given the presence of unary-minus and binary
>plus), and the backquote operator `...` (non-necessary given the
>existence of builtin function repr). 

All of the above are OK with me since I see them as funny ways to call
functions back from C++. Aliases and syntactic sugar are cool, but
still, not in/is not feels different... YMMV, after all, it's just a
matter of style.

> Yes, operators 'not in' and
>'is not' are indeed not part of a provably minimal subset of
>necessary operators, just like many others.  Python does not
>even attempt to provide a provably minimal subset; there is a
>carefully-balanced amount of redundancy for increased readability.
>
I believe you. I still have a very long way to go with Python, and
will share what I find interesting with others!

>For example, most readers will find:
>    a - b
>more readable than
>    a + -b
>even though they're obviously equivalent, semantically.

AOL!




More information about the Python-list mailing list