@@ -207,7 +207,7 @@ def compileExpression(self, expr):
207207 try :
208208 return self .expressionCompiler .compile (expr )
209209 except self .CompilerError as err :
210- raise TALError ('%s in expression %s' % (err .args [0 ], ` expr` ),
210+ raise TALError ('%s in expression %s' % (err .args [0 ], repr ( expr ) ),
211211 self .position )
212212
213213 def pushProgram (self ):
@@ -268,7 +268,7 @@ def emitDefines(self, defines):
268268 m = re .match (
269269 r"(?s)\s*(?:(global|local)\s+)?(%s)\s+(.*)\Z" % NAME_RE , part )
270270 if not m :
271- raise TALError ("invalid define syntax: " + ` part` ,
271+ raise TALError ("invalid define syntax: " + repr ( part ) ,
272272 self .position )
273273 scope , name , expr = m .group (1 , 2 , 3 )
274274 scope = scope or "local"
@@ -302,7 +302,7 @@ def emitCondition(self, expr):
302302 def emitRepeat (self , arg ):
303303 m = re .match ("(?s)\s*(%s)\s+(.*)\Z" % NAME_RE , arg )
304304 if not m :
305- raise TALError ("invalid repeat syntax: " + ` arg` ,
305+ raise TALError ("invalid repeat syntax: " + repr ( arg ) ,
306306 self .position )
307307 name , expr = m .group (1 , 2 )
308308 cexpr = self .compileExpression (expr )
@@ -370,10 +370,10 @@ def emitDefineMacro(self, macroName):
370370 program = self .popProgram ()
371371 macroName = macroName .strip ()
372372 if self .macros .has_key (macroName ):
373- raise METALError ("duplicate macro definition: %s" % ` macroName` ,
373+ raise METALError ("duplicate macro definition: %s" % repr ( macroName ) ,
374374 self .position )
375375 if not re .match ('%s$' % NAME_RE , macroName ):
376- raise METALError ("invalid macro name: %s" % ` macroName` ,
376+ raise METALError ("invalid macro name: %s" % repr ( macroName ) ,
377377 self .position )
378378 self .macros [macroName ] = program
379379 self .inMacroDef = self .inMacroDef - 1
@@ -389,18 +389,18 @@ def emitDefineSlot(self, slotName):
389389 program = self .popProgram ()
390390 slotName = slotName .strip ()
391391 if not re .match ('%s$' % NAME_RE , slotName ):
392- raise METALError ("invalid slot name: %s" % ` slotName` ,
392+ raise METALError ("invalid slot name: %s" % repr ( slotName ) ,
393393 self .position )
394394 self .emit ("defineSlot" , slotName , program )
395395
396396 def emitFillSlot (self , slotName ):
397397 program = self .popProgram ()
398398 slotName = slotName .strip ()
399399 if self .slots .has_key (slotName ):
400- raise METALError ("duplicate fill-slot name: %s" % ` slotName` ,
400+ raise METALError ("duplicate fill-slot name: %s" % repr ( slotName ) ,
401401 self .position )
402402 if not re .match ('%s$' % NAME_RE , slotName ):
403- raise METALError ("invalid slot name: %s" % ` slotName` ,
403+ raise METALError ("invalid slot name: %s" % repr ( slotName ) ,
404404 self .position )
405405 self .slots [slotName ] = program
406406 self .inMacroUse = 1
@@ -487,23 +487,23 @@ def emitStartElement(self, name, attrlist, taldict, metaldict, i18ndict,
487487 self .position = position
488488 for key , value in taldict .items ():
489489 if key not in TALDefs .KNOWN_TAL_ATTRIBUTES :
490- raise TALError ("bad TAL attribute: " + ` key` , position )
490+ raise TALError ("bad TAL attribute: " + repr ( key ) , position )
491491 if not (value or key == 'omit-tag' ):
492492 raise TALError ("missing value for TAL attribute: " +
493- ` key` , position )
493+ repr ( key ) , position )
494494 for key , value in metaldict .items ():
495495 if key not in TALDefs .KNOWN_METAL_ATTRIBUTES :
496- raise METALError ("bad METAL attribute: " + ` key` ,
496+ raise METALError ("bad METAL attribute: " + repr ( key ) ,
497497 position )
498498 if not value :
499499 raise TALError ("missing value for METAL attribute: " +
500- ` key` , position )
500+ repr ( key ) , position )
501501 for key , value in i18ndict .items ():
502502 if key not in TALDefs .KNOWN_I18N_ATTRIBUTES :
503- raise I18NError ("bad i18n attribute: " + ` key` , position )
503+ raise I18NError ("bad i18n attribute: " + repr ( key ) , position )
504504 if not value and key in ("attributes" , "data" , "id" ):
505505 raise I18NError ("missing value for i18n attribute: " +
506- ` key` , position )
506+ repr ( key ) , position )
507507 todo = {}
508508 defineMacro = metaldict .get ("define-macro" )
509509 useMacro = metaldict .get ("use-macro" )
0 commit comments