mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Killed the <> operator. You must now use !=.
Opportunistically also fixed one or two places where '<> None' should be 'is not None' and where 'type(x) <> y' should be 'not isinstance(x, y)'.
This commit is contained in:
parent
01c77c6628
commit
b053cd8f40
36 changed files with 171 additions and 178 deletions
|
@ -63,7 +63,7 @@ class Headers:
|
|||
Does *not* raise an exception if the header is missing.
|
||||
"""
|
||||
name = name.lower()
|
||||
self._headers[:] = [kv for kv in self._headers if kv[0].lower()<>name]
|
||||
self._headers[:] = [kv for kv in self._headers if kv[0].lower() != name]
|
||||
|
||||
def __getitem__(self,name):
|
||||
"""Get the first header value for 'name'
|
||||
|
|
|
@ -98,7 +98,7 @@ def shift_path_info(environ):
|
|||
return None
|
||||
|
||||
path_parts = path_info.split('/')
|
||||
path_parts[1:-1] = [p for p in path_parts[1:-1] if p and p<>'.']
|
||||
path_parts[1:-1] = [p for p in path_parts[1:-1] if p and p != '.']
|
||||
name = path_parts[1]
|
||||
del path_parts[1]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue