mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
New == syntax
This commit is contained in:
parent
4d8e859e8f
commit
bdfcfccbe5
73 changed files with 419 additions and 391 deletions
|
@ -21,7 +21,7 @@ def isabs(s):
|
|||
|
||||
def join(s, t):
|
||||
if (not s) or isabs(t): return t
|
||||
if t[:1] = ':': t = t[1:]
|
||||
if t[:1] == ':': t = t[1:]
|
||||
if ':' not in s:
|
||||
s = ':' + s
|
||||
if s[-1:] <> ':':
|
||||
|
@ -40,7 +40,7 @@ def split(s):
|
|||
if ':' not in s: return '', s
|
||||
colon = 0
|
||||
for i in range(len(s)):
|
||||
if s[i] = ':': colon = i+1
|
||||
if s[i] == ':': colon = i+1
|
||||
return s[:colon], s[colon:]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue