From f715366f23f47832a4b9914c54d5a63b19f17eba Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 7 Feb 2005 14:16:21 +0000 Subject: Reduce the usage of the types module. --- Lib/cookielib.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Lib/cookielib.py') diff --git a/Lib/cookielib.py b/Lib/cookielib.py index 268cc204fa..7fec8584fe 100644 --- a/Lib/cookielib.py +++ b/Lib/cookielib.py @@ -26,7 +26,6 @@ are available from http://wwwsearch.sf.net/): """ import sys, re, urlparse, copy, time, urllib, logging -from types import StringTypes try: import threading as _threading except ImportError: @@ -359,7 +358,7 @@ def split_header_words(header_values): [[('Basic', None), ('realm', '"foobar"')]] """ - assert type(header_values) not in StringTypes + assert not isinstance(header_values, basestring) result = [] for text in header_values: orig_text = text -- cgit v1.2.1