Changes between Version 3 and Version 4 of ModelMiddleware


Ignore:
Timestamp:
12/23/2009 01:38:13 AM (6 years ago)
Author:
bugmenot
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModelMiddleware

    v3 v4  
    9090        # lets be nice to ourselves and provide a default value for the initial header level
    9191        for opt in opts:
    92             if not opt.has_key("init_header"):
    93                 opt["init_header"] = 1
     92            opt.setdefault("init_header", 1)
    9493       
    9594        # parse for as many fields as we have options for
     
    142141        # lets be nice to ourselves and provide a default value for the initial header level
    143142        for opt in opts:
    144             if not opt.has_key("init_header"):
    145                 opt["init_header"] = 1
     143            opt.setdefault("init_header", 1)
    146144       
    147145        # parse for as many fields as we have options for
Back to Top