1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-11 13:55:55 +03:00

python: Fix equality of unicode/normal strings in Python 2.x

This commit is contained in:
Dov Murik 2016-01-27 13:02:14 -05:00
parent 33dec7afc2
commit a16bb08f51
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,8 @@ else:
def _equal_Q(a, b):
ota, otb = type(a), type(b)
if _string_Q(a) and _string_Q(b):
return a == b
if not (ota == otb or (_sequential_Q(a) and _sequential_Q(b))):
return False;
if _symbol_Q(a):

View File

@ -94,6 +94,8 @@
;=>false
(= "abc" 'abc)
;=>false
(= "abc" (str 'abc))
;=>true
;;;;; Test quine
;;; TODO: needs expect line length fix