Changeset 3893:8ded7a61db60 in livinglogic.python.xist for src/ll/xist/scripts/xml2xsc.py

Show
Ignore:
Timestamp:
11/25/09 12:08:39 (10 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Use format method instead of % for string formatting. Optimize JSP for UL4 templates.

The generated JSP code for the UL4 function xmlescape no longer calls
ObjectUtils?.toString().

Use autoboxing in the Java code generated by jsp.fromul4().

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/scripts/xml2xsc.py

    r3691 r3893  
    106106                    entry[0].modelargs = elements 
    107107    else: 
    108         raise ValueError("unknown sims mode %r" % sims) 
     108        raise ValueError("unknown sims mode {0!r}".format(sims)) 
    109109    return ns 
    110110 
     
    118118        node = etree.parse(stream).getroot() 
    119119    else: 
    120         raise ValueError("unknown parser %r" % parser) 
     120        raise ValueError("unknown parser {0!r}".format(parser)) 
    121121     
    122122    return etree2xnd(sims, node) 
     
    127127    p.add_option("-p", "--parser", dest="parser", help="parser module to use for XML parsing (etree or lxml)", choices=("etree", "lxml"), default="etree") 
    128128    choices = ["none", "simple", "full"] 
    129     p.add_option("-s", "--sims", dest="sims", help="Create sims info? (%s)" % ", ".join(choices), metavar="MODE", default="simple") 
     129    p.add_option("-s", "--sims", dest="sims", help="Create sims info? ({0})".format(", ".join(choices)), metavar="MODE", default="simple") 
    130130 
    131131    (options, args) = p.parse_args(args)