diff options
author | Guido van Rossum <guido@python.org> | 1993-11-30 13:40:46 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-11-30 13:40:46 (GMT) |
commit | 590baa4a7a43b596119b47f605e3e570c2b3b0ee (patch) | |
tree | 767cbcf90f5b53bf63be9c2ea9a8081551120f10 /Objects/funcobject.c | |
parent | 8732d6aeea250f23af50b772d710109c9ee3bc00 (diff) | |
download | cpython-590baa4a7a43b596119b47f605e3e570c2b3b0ee.zip cpython-590baa4a7a43b596119b47f605e3e570c2b3b0ee.tar.gz cpython-590baa4a7a43b596119b47f605e3e570c2b3b0ee.tar.bz2 |
* 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.
Diffstat (limited to 'Objects/funcobject.c')
-rw-r--r-- | Objects/funcobject.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index 4dc0b90..cc4900a 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -100,9 +100,12 @@ func_repr(op) 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); } |