checking if two things do not equal None

MRAB python at mrabarnett.plus.com
Sun Mar 30 09:58:11 EDT 2014


On 2014-03-30 13:21, Roy Smith wrote:
> In article <5337b4e4$0$29994$c3e8da3$5496439d at news.astraweb.com>,
>   Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:
>
>> I think Johannes got it right: boolean logic is easier to reason about
>> when there is a minimum of "not"s.
>
> I used to do a lot of digital logic design.  In certain logic families,
> it's easier to build a NAND gate than an AND gate (and similarly, NOR is
> easier than OR).  This leads to lots of inverted logic.  Adding to the
> confusion, many designs would use "active low" logic, which means a 1
> was represented by a low voltage, and a 0 by a high voltage.  So, you
> quickly end up with gibberish like, "not active low clear nand not
> active low enable clock".  I'm glad I don't do that stuff any more.
>
When you're building with discrete logic chips, NAND gates are useful
because you can use them as inverters too, which helps to keep the chip
count down.



More information about the Python-list mailing list