From: Guido van Rossum Date: Thu, 10 Nov 1994 22:40:34 +0000 (+0000) Subject: set name to instead of None for lambdas X-Git-Tag: v1.1.1~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=363ac7d5b6513e68b61008e2867ef23886e70619;p=thirdparty%2FPython%2Fcpython.git set name to instead of None for lambdas --- diff --git a/Python/compile.c b/Python/compile.c index d81340069729..b3b610a55c8e 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2274,7 +2274,7 @@ compile_lambdef(c, n) { node *ch; REQ(n, lambdef); /* lambdef: 'lambda' [parameters] ':' test */ - c->c_name = NULL; + c->c_name = ""; ch = CHILD(n, 1); if (TYPE(ch) == COLON) { @@ -2515,12 +2515,7 @@ compile(n, filename) if (sc.c_errors == 0) { object *v, *w; v = newstringobject(sc.c_filename); - if (sc.c_name) - w = newstringobject(sc.c_name); - else { - INCREF(None); - w = None; - } + w = newstringobject(sc.c_name); if (v != NULL && w != NULL) co = newcodeobject(sc.c_code, sc.c_consts, sc.c_names, v, w);