summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 21562ae71b..944525591b 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1527,6 +1527,11 @@ filtertuple(func, tuple)
register int i, j;
int len = gettuplesize(tuple);
+ if (len == 0) {
+ INCREF(tuple);
+ return tuple;
+ }
+
if ((result = newtupleobject(len)) == NULL)
return NULL;