Mercurial > cpython-lru_cache-weakref
diff Objects/funcobject.c @ 1415:06570429f062 legacy-trunk
* import.c (get_module): pass .py filename to parse_file, not .pyc filename!
* funcobject.c (func_repr): don't call getstringvalue(None) for anonymous
functions.
* bltinmodule.c: removed lambda (which is now a built-in function);
removed implied lambda for string arg to filter/map/reduce.
* Grammar, graminit.[ch], compile.[ch]: replaced lambda as built-in
function by lambda as grammar entity: instead of "lambda('x: x+1')" you
write "lambda x: x+1".
* Xtmodule.c (checkargdict): return 0, not NULL, for error.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 30 Nov 1993 13:40:46 +0000 |
| parents | cc172ce05561 |
| children | b724599401ff |
line wrap: on
line diff
--- a/Objects/funcobject.c Tue Nov 23 17:54:03 1993 +0000 +++ b/Objects/funcobject.c Tue Nov 30 13:40:46 1993 +0000 @@ -100,9 +100,12 @@ funcobject *op; { char buf[140]; - sprintf(buf, "<function %.100s at %lx>", - getstringvalue(op->func_name), - (long)op); + if (op->func_name == None) + sprintf(buf, "<anonymous function at %lx>", (long)op); + else + sprintf(buf, "<function %.100s at %lx>", + getstringvalue(op->func_name), + (long)op); return newstringobject(buf); }
