Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #85955

Re: What behavior would you expect?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Paul Rubin <no.email@nospam.invalid>
Newsgroups comp.lang.python
Subject Re: What behavior would you expect?
Date Thu, 19 Feb 2015 23:18:04 -0800
Organization A noiseless patient Spider
Lines 7
Message-ID <87mw49dpar.fsf@jester.gateway.pace.com> (permalink)
References <mailman.18856.1424321059.18130.python-list@python.org> <mc4r7v$cm7$2@dont-email.me> <mailman.18884.1424358984.18130.python-list@python.org> <mc5fiq$a3f$3@dont-email.me> <mailman.18902.1424376675.18130.python-list@python.org> <mc6emp$j1q$1@dont-email.me> <mailman.18908.1424409419.18130.python-list@python.org> <mc6hd4$j1q$2@dont-email.me> <87r3tlds2l.fsf@jester.gateway.pace.com> <mailman.18914.1424413711.18130.python-list@python.org>
Mime-Version 1.0
Content-Type text/plain
Injection-Info mx02.eternal-september.org; posting-host="c694756f1077760bb5296aae16c74092"; logging-data="13148"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193QWUj15b2dCvjcGYjr0of"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:ed3fHxsNZMFBdqRKyXu20xgZkYE= sha1:FSgJ9xetBLURLpPJdu3g4nzbojk=
Xref csiph.com comp.lang.python:85955

Show key headers only | View raw


Chris Angelico <rosuav@gmail.com> writes:
>>   if len(fs) == 0:  ... # didn't get a filename
> Bikeshedding: That could be written as simply "if not fs". :)

Yeah, in that instance you could do that.  It's an unsafe practice when
None is used as the no-value marker, since the empty string is a
perfectly good string and also converts to boolean false.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

What behavior would you expect? Jason Friedman <jsf80238@gmail.com> - 2015-02-18 21:44 -0700
  Re: What behavior would you expect? Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-19 14:16 +0000
    Re: What behavior would you expect? Chris Angelico <rosuav@gmail.com> - 2015-02-20 02:08 +1100
      Re: What behavior would you expect? Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-19 20:03 +0000
        Re: What behavior would you expect? Chris Angelico <rosuav@gmail.com> - 2015-02-20 07:11 +1100
          Re: What behavior would you expect? Dan Sommers <dan@tombstonezero.net> - 2015-02-20 04:54 +0000
            Re: What behavior would you expect? Chris Angelico <rosuav@gmail.com> - 2015-02-20 16:16 +1100
              Re: What behavior would you expect? Dan Sommers <dan@tombstonezero.net> - 2015-02-20 05:40 +0000
                Re: What behavior would you expect? Jason Friedman <jsf80238@gmail.com> - 2015-02-19 22:49 -0700
                Re: What behavior would you expect? Paul Rubin <no.email@nospam.invalid> - 2015-02-19 22:18 -0800
                Re: What behavior would you expect? Chris Angelico <rosuav@gmail.com> - 2015-02-20 17:21 +1100
                Re: What behavior would you expect? Paul Rubin <no.email@nospam.invalid> - 2015-02-19 23:18 -0800

csiph-web