[Numpy-tickets] [NumPy] #476: Strings with leading nulls don't compare properly

NumPy numpy-tickets@scipy....
Sat Mar 24 04:48:50 CDT 2007


#476: Strings with leading nulls don't compare properly
-----------------------+----------------------------------------------------
 Reporter:  kreymborg  |        Owner:  somebody
     Type:  defect     |       Status:  new     
 Priority:  normal     |    Milestone:          
Component:  Other      |      Version:          
 Severity:  normal     |   Resolution:          
 Keywords:             |  
-----------------------+----------------------------------------------------
Comment (by kreymborg):

 Code snippet should read:

 s1 = "\000\001"[[BR]]
 s2 = "\000\002"[[BR]]
 print s1 == s2 # this evaluates as *False*[[BR]]
 print array(s1) == array(s2) # this evaluates *True*[[BR]]

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/476#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list