Re: Coding style



tac-tics wrote:
Or even just:

lst = []

;-)


Indeed.

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

Take them off to where they belong!

I'll bet you still write

if a>3 == True:

don't you ;-)

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

.



Relevant Pages

  • Re: Coding style
    ... Empty lists are not false. ... live dedicated boolean data types. ...
    (comp.lang.python)
  • 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
    ... tac-tics wrote: ... live dedicated boolean data types. ...
    (comp.lang.python)