[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to let argument be optional falling back to certain integer

On Sun, Jun 21, 2020 at 10:06 AM Boris Dorestand <bdorestand at> wrote:
> Chris Angelico <rosuav at> writes:
> > Zero being false shouldn't be a surprise. If None can count as false,
> > then so should other "emptiness" values. (Remember, the canonical
> > falseness value is False, not None.)
> This is true.  I have written 0 as false in C so many times.  But
> clearly for me times have changed...  I now look at numbers as a thing
> in their own special class not to be confused as truth-values.  (So much
> so that I fell for this.)  But I confess I still think of numbers as all
> TRUE.  (Even zero!)

That's an interesting view. But fortunately you can have that too -
just have to treat None as its own thing, instead of using a falsiness
test. :)

> Anyway, I kind of replied just to thank you all for the great group this
> is.  ChrisA, I don't know how can keep up with this newsgroup, but you
> do.  This is crazy.  Years go by and when I come back, there you are
> still.  You're priceless.

You're most welcome! I hang out here a lot because the people here are
awesome. I've learned a lot, helped a lot of people, the language has
shifted, it's been great.

I like to think of myself as an empowerer - I help YOU to be able to
do amazing things. It's you who are the awesome creative person who's
making code do magic, and I'm just removing barriers from your way :)