mirror of
https://github.com/python/cpython.git
synced 2025-10-15 03:10:29 +00:00
Whitespace cleanup; now passes the regression test (the last checkin made
it fail on a TabError (inconsistent tab/space usage)). Removed a comment about including a test since there is a regression test for this module.
This commit is contained in:
parent
103d5268c2
commit
ff5364ac9d
1 changed files with 15 additions and 21 deletions
|
@ -309,7 +309,7 @@ _Translator = {
|
||||||
}
|
}
|
||||||
|
|
||||||
def _quote(str, LegalChars=_LegalChars,
|
def _quote(str, LegalChars=_LegalChars,
|
||||||
join=string.join, idmap=string._idmap, translate=string.translate):
|
join=string.join, idmap=string._idmap, translate=string.translate):
|
||||||
#
|
#
|
||||||
# If the string does not need to be double-quoted,
|
# If the string does not need to be double-quoted,
|
||||||
# then just return the string. Otherwise, surround
|
# then just return the string. Otherwise, surround
|
||||||
|
@ -317,9 +317,9 @@ def _quote(str, LegalChars=_LegalChars,
|
||||||
# special characters.
|
# special characters.
|
||||||
#
|
#
|
||||||
if "" == translate(str, idmap, LegalChars):
|
if "" == translate(str, idmap, LegalChars):
|
||||||
return str
|
return str
|
||||||
else:
|
else:
|
||||||
return '"' + join( map(_Translator.get, str, str), "" ) + '"'
|
return '"' + join( map(_Translator.get, str, str), "" ) + '"'
|
||||||
# end _quote
|
# end _quote
|
||||||
|
|
||||||
|
|
||||||
|
@ -440,7 +440,7 @@ class Morsel(UserDict):
|
||||||
# end __setitem__
|
# end __setitem__
|
||||||
|
|
||||||
def isReservedKey(self, K):
|
def isReservedKey(self, K):
|
||||||
return string.lower(K) in self._reserved_keys
|
return string.lower(K) in self._reserved_keys
|
||||||
# end isReservedKey
|
# end isReservedKey
|
||||||
|
|
||||||
def set(self, key, val, coded_val,
|
def set(self, key, val, coded_val,
|
||||||
|
@ -645,8 +645,6 @@ class BaseCookie(UserDict):
|
||||||
rval, cval = self.value_decode(V)
|
rval, cval = self.value_decode(V)
|
||||||
self.__set(K, rval, cval)
|
self.__set(K, rval, cval)
|
||||||
M = self[K]
|
M = self[K]
|
||||||
|
|
||||||
return
|
|
||||||
# end __ParseString
|
# end __ParseString
|
||||||
# end BaseCookie class
|
# end BaseCookie class
|
||||||
|
|
||||||
|
@ -723,10 +721,6 @@ Cookie = SmartCookie
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# should add a test routine?
|
|
||||||
#
|
|
||||||
|
|
||||||
#Local Variables:
|
#Local Variables:
|
||||||
#tab-width: 4
|
#tab-width: 4
|
||||||
#end:
|
#end:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue