﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
413,QName-s comparision,ilias@…,hodgestar,"I've found a bug:

{{{
#!python

>>> from genshi.core import QName
>>> q1 = QName(""{http://thechampion.ru/}current-path"")
>>> q2 = QName(""http://thechampion.ru}current-path"")
>>> q1 == q2
False
}}}

Why?

{{{
#!python

>>> q1, q2
(QName('http://thechampion.ru/}current-path'), QName('http://thechampion.ru/}current-path'))
>>> q1.namespace == q2.namespace and q1.localname == q2.localname
True
}}}

WTF?

QName is subclass of unicode, so the comparision q1 == q2 uses unicode.__cmp__() or unicode.__eq__().

{{{
#!python

>>> unicode(q1), unicode(q2)
(u'{{http://thechampion.ru/}current-path', u'{http://thechampion.ru/}current-path')
}}}

Gotcha! q1 has unnecessary curly brace in the beginning.

The patches are applied.",defect,closed,trivial,0.6.1,General,0.6,fixed,,
