PEP218: Representing the empty set

Tim Roberts timr at probo.com
Thu Feb 19 08:43:47 CET 2004


Paul Rubin <http://phr.cx@NOSPAM.invalid> wrote:
>
>But you suffer the overhead either way.  The {} syntax may be worse
>than the function call syntax because it looks like it avoids the
>overhead when it really doesn't.  The correct way to avoid the
>overhead is with "if len(b) != 0: ... ".

Or, the way I would write it:

    if b:
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list