diff Python/bltinmodule.c @ 1393:7d6a2d950f13 legacy-trunk

* nismodule.c: database keys and values can contain null bytes. be more careful about these. * arraymodule.c: added 8 byte swap; added 'i' format character; added reverse() method; rename read/write to fromfile/tofile. * config.c: Set version to 0.9.9++. * rotormodule.c (r_rand): declare k1..k5 as unsigned longs so the shifts will have a well-defined effect independent of word size. * bltinmodule.c: renamed bagof() to filter().
author Guido van Rossum <guido@python.org>
date Wed, 03 Nov 1993 15:01:26 +0000
parents f992ac2a38d5
children aac8231a715c
line wrap: on
line diff
--- a/Python/bltinmodule.c	Tue Nov 02 15:34:23 1993 +0000
+++ b/Python/bltinmodule.c	Wed Nov 03 15:01:26 1993 +0000
@@ -67,7 +67,7 @@
 }
 
 static object *
-builtin_bagof(self, args)
+builtin_filter(self, args)
 	object *self;
 	object *args;
 {
@@ -101,7 +101,7 @@
 
 	if ((sqf = seq->ob_type->tp_as_sequence) == NULL) {
 		err_setstr(TypeError,
-			   "argument 2 to bagof() must be a sequence type");
+			   "argument 2 to filter() must be a sequence type");
 		goto Fail_2;
 	}
 
@@ -1121,7 +1121,6 @@
 static struct methodlist builtin_methods[] = {
 	{"abs",		builtin_abs},
 	{"apply",	builtin_apply},
-	{"bagof",	builtin_bagof},
 	{"chr",		builtin_chr},
 	{"cmp",		builtin_cmp},
 	{"coerce",	builtin_coerce},
@@ -1130,6 +1129,7 @@
 	{"divmod",	builtin_divmod},
 	{"eval",	builtin_eval},
 	{"execfile",	builtin_execfile},
+	{"filter",	builtin_filter},
 	{"float",	builtin_float},
 	{"getattr",	builtin_getattr},
 	{"hasattr",	builtin_hasattr},
@@ -1271,7 +1271,7 @@
 }
 
 
-/* Helper for bagof(): filter a tuple through a function */
+/* Helper for filter(): filter a tuple through a function */
 
 static object *
 filtertuple(func, tuple)
@@ -1324,7 +1324,7 @@
 }
 
 
-/* Helper for bagof(): filter a string through a function */
+/* Helper for filter(): filter a string through a function */
 
 static object *
 filterstring(func, strobj)