comparison problem.py @ 74:aea4fc87698a

Minimal code clean-up
author Oleg Oshmyan <chortos@inbox.lv>
date Thu, 06 Jan 2011 20:06:42 +0200
parents 4ea7133ac25c
children 007f7eb6fb2b
comparison
equal deleted inserted replaced
73:b071ef77377c 74:aea4fc87698a
91 if not isinstance(name, basestring): 91 if not isinstance(name, basestring):
92 # This shouldn't happen, of course 92 # This shouldn't happen, of course
93 raise TypeError('Problem() argument 1 must be string, not ' + type(name).__name__) 93 raise TypeError('Problem() argument 1 must be string, not ' + type(name).__name__)
94 prob.name = name 94 prob.name = name
95 prob.config = config.load_problem(name) 95 prob.config = config.load_problem(name)
96 if not getattr(prob.config, 'kind', None): prob.config.kind = 'batch'
97 prob.cache = Cache({'padoutput': 0}) 96 prob.cache = Cache({'padoutput': 0})
98 prob.testcases = testcases.load_problem(prob) 97 prob.testcases = testcases.load_problem(prob)
99 98
100 # TODO 99 # TODO
101 def build(prob): 100 def build(prob):