diff --git a/special-method-names.html b/special-method-names.html index 0821d09..94bdd89 100644 --- a/special-method-names.html +++ b/special-method-names.html @@ -255,13 +255,13 @@ bytes = zef_file.read(12) So You Write… And Python Calls… -the length of a sequence -len(seq) -seq.__len__() +the number of items +len(s) +s.__len__() -to know whether a sequence contains a specific value -x in seq -seq.__contains__(x) +to know whether it contains a specific value +x in s +s.__contains__(x)

The cgi module uses these methods in its FieldStorage class, which represents all of the form fields or query parameters submitted to a dynamic web page.