[Twisted-Python] clean up app.getApplication

Jp Calderone exarkun at intarweb.us
Sat Sep 27 18:37:23 EDT 2003


On Sun, Sep 28, 2003 at 12:17:00AM +0200, Paul Boehm wrote:
> i was doing something else, couldn't quite understand the code at first
> (where does the listcomp begin, where does it end?), so here's a more
> explicit version:

  That original version was pretty icky, yea.

  Thangs for posting this here (though someone may tell you it belongs on
the bug tracker at http://www.twistedmatrix.com/bugs/, which it probably
does), because it reminded me of something we should be able to get rid of
now.

  "python" style is indicated by the string "python".
  "xml" style is indicated by the string "xml".
  "source" style is indicated by the string "source".
  "pickle" style is indicated by the string "file".

  Now, let's play a game that everyone who's watched Seasame Street should
know -- Which of these things is not like the others?

  Is there any reason *not* to fix this now?

  Jp

> [snip]
> +    for t in ['python', 'xml', 'source', 'file', 'tapdir', None]:
> +        style = t
> +        filename = config[style]
> +        if filename:
> +            break
> +    if style == 'file':
> +        style = 'pickle'
> +
> [snip]

-- 
Examinations are formidable even to the best prepared, for
even the greatest fool may ask more than the wisest man can answer.
                -- C.C. Colton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030927/7ff0a1f1/attachment.pgp 


More information about the Twisted-Python mailing list