Lines Matching refs:write
94 def write(self, x): member in SourceGenerator
105 self.write('# line: %s' % node.lineno)
119 self.write('else:')
126 self.write(', ')
135 self.write('=')
139 self.write('*' + node.vararg)
142 self.write('**' + node.kwarg)
147 self.write('@')
156 self.write(', ')
158 self.write(' = ')
164 self.write(BINOP_SYMBOLS[type(node.op)] + '=')
169 self.write('from %s%s import ' % ('.' * node.level, node.module))
172 self.write(', ')
173 self.write(item)
178 self.write('import ')
189 self.write('def %s(' % node.name)
191 self.write('):')
198 self.write(', ')
201 self.write('(')
206 self.write('class %s' % node.name)
215 self.write(keyword.arg + '=')
219 self.write('*')
223 self.write('**')
225 self.write(have_args and '):' or ':')
230 self.write('if ')
232 self.write(':')
239 self.write('elif ')
241 self.write(':')
245 self.write('else:')
251 self.write('for ')
253 self.write(' in ')
255 self.write(':')
260 self.write('while ')
262 self.write(':')
267 self.write('with ')
270 self.write(' as ')
272 self.write(':')
277 self.write('pass')
282 self.write('print ')
285 self.write(' >> ')
290 self.write(', ')
294 self.write(',')
298 self.write('del ')
301 self.write(', ')
306 self.write('try:')
313 self.write('try:')
316 self.write('finally:')
321 self.write('global ' + ', '.join(node.names))
325 self.write('nonlocal ' + ', '.join(node.names))
329 self.write('return ')
334 self.write('break')
338 self.write('continue')
343 self.write('raise')
345 self.write(' ')
348 self.write(' from ')
353 self.write(', ')
356 self.write(', ')
363 self.write('.' + node.attr)
369 self.write(', ')
374 self.write('(')
380 self.write(keyword.arg + '=')
384 self.write('*')
388 self.write('**')
390 self.write(')')
393 self.write(node.id)
396 self.write(repr(node.value))
399 self.write('(')
403 self.write(', ')
405 self.write(idx and ')' or ',)')
409 self.write(left)
412 self.write(', ')
414 self.write(right)
422 self.write('{')
425 self.write(', ')
427 self.write(': ')
429 self.write('}')
433 self.write(' %s ' % BINOP_SYMBOLS[type(node.op)])
437 self.write('(')
440 self.write(' %s ' % BOOLOP_SYMBOLS[type(node.op)])
442 self.write(')')
445 self.write('(')
446 self.write(node.left)
448 self.write(' %s %%' % CMPOP_SYMBOLS[type(op)])
450 self.write(')')
453 self.write('(')
455 self.write(op)
457 self.write(' ')
459 self.write(')')
463 self.write('[')
465 self.write(']')
470 self.write(':')
474 self.write(':')
481 self.write(', ')
485 self.write('yield ')
489 self.write('lambda ')
491 self.write(': ')
495 self.write('Ellipsis')
499 self.write(left)
503 self.write(right)
512 self.write('{')
514 self.write(': ')
518 self.write('}')
522 self.write(' if ')
524 self.write(' else ')
528 self.write('*')
533 self.write('`')
535 self.write('`')
540 self.write(node.name)
542 self.write(' as ' + node.asname)
545 self.write(' for ')
547 self.write(' in ')
551 self.write(' if ')
556 self.write('except')
558 self.write(' ')
561 self.write(' as ')
563 self.write(':')