def check_same_constant(const):
    ns = {}
    code = ('f1, f2 = lambda: %r, lambda: %r' % (const, const))
    exec(code, ns)
    f1 = ns['f1']
    f2 = ns['f2']
    self.assertIs(f1.__code__, f2.__code__)
    self.check_constant(f1, const)
    self.assertEqual(repr(f1()), repr(const))
def check_same_constant(const):
    ns = {}
    code = ('f1, f2 = lambda: %r, lambda: %r' % (const, const))
    exec(code, ns)
    f1 = ns['f1']
    f2 = ns['f2']
    self.assertIs(f1.__code__, f2.__code__)
    self.check_constant(f1, const)
    self.assertEqual(repr(f1()), repr(const))