« 0.2-rc1Subway's new Ajax framework »

2 comments

Comment from: Robin Becker [Visitor] · http://www.reportlab.org

I made a small patch to py2js to allow for augmented assignment. Unfortunately that file causes a problem when using svn diff as svn:eol-style == 'lf'. When I use svn diff I get this
C:\Tmp\crackajax>svn diff
svn: 'py2js.py' has unknown value for svn:eol-style property

Probably the text files should have svn:eol-style set to native

anyhow here's the difference

74a75,80

def process_augAssign(self, node):<br />
    lval = node.node<br />
    if lval.__class__ == ast.AssTuple:<br />
        return "// xxx: can't assign tuples yet"<br />
    else:<br />
        return self.python2js(lval) + node.op + self.python2js(node.expr) + ";" + os.linesep<br />

123a130,134
elif nodetype == ast.AugAssign:
parsechildren = False
#jsbuf.write(self.python2js(node.nodes[0]) + " = " + self.python2js(node.expr))
#closechar = ";" + os.linesep
jsbuf.write(self.process_augAssign(node))

11/20/05 @ 03:18
Comment from: Robin Becker [Visitor] · http://www.reportlab.org

I made a small patch to py2js to allow for augmented assignment. Unfortunately that file causes a problem when using svn diff as svn:eol-style == 'lf'. When I use svn diff I get this
C:\Tmp\crackajax>svn diff
svn: 'py2js.py' has unknown value for svn:eol-style property

Probably the text files should have svn:eol-style set to native

anyhow here's the ordinary difference

74a75,80

def process_augAssign(self, node):<br />
    lval = node.node<br />
    if lval.__class__ == ast.AssTuple:<br />
        return "// xxx: can't assign tuples yet"<br />
    else:<br />
        return self.python2js(lval) + node.op + self.python2js(node.expr) + ";" + os.linesep<br />

123a130,134
elif nodetype == ast.AugAssign:
parsechildren = False
#jsbuf.write(self.python2js(node.nodes[0]) + " = " + self.python2js(node.expr))
#closechar = ";" + os.linesep
jsbuf.write(self.process_augAssign(node))

11/20/05 @ 03:19

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.

Please enter the phrase "I am a real human." in the textbox above.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)