Re: Coding style



tac-tics wrote:

I'd say the second one. Empty lists are not false. They are empty. Long
live dedicated boolean data types.

Uh, no, empty lists are False in a boolean context:

http://docs.python.org/lib/truth.html

-Don
.



Relevant Pages

  • Re: Coding style
    ... Long live dedicated boolean data types. ... Tac-tics is right, an empty list is not False. ...
    (comp.lang.python)
  • Re: Coding style
    ... Empty lists are not false. ... live dedicated boolean data types. ...
    (comp.lang.python)
  • Re: Coding style
    ... Empty lists are not false. ... live dedicated boolean data types. ...
    (comp.lang.python)
  • Re: Coding style
    ... Empty lists are not false. ... live dedicated boolean data types. ...
    (comp.lang.python)