mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
dictclient: remove overly complex dequote method
This commit is contained in:
parent
989ac5ee97
commit
0e1e37a5a2
@ -20,15 +20,10 @@ import socket, re
|
||||
|
||||
version = '1.0'
|
||||
|
||||
def dequote(str):
|
||||
def dequote(s):
|
||||
"""Will remove single or double quotes from the start and end of a string
|
||||
and return the result."""
|
||||
quotechars = "'\""
|
||||
while len(str) and str[0] in quotechars:
|
||||
str = str[1:]
|
||||
while len(str) and str[-1] in quotechars:
|
||||
str = str[0:-1]
|
||||
return str
|
||||
return s.strip("'\"")
|
||||
|
||||
def enquote(str):
|
||||
"""This function will put a string in double quotes, properly
|
||||
|
Loading…
Reference in New Issue
Block a user