Hi,

> type checking is better done with isinstance

isn't "type() is" significantly faster?

> unicode('item', 'utf-8') was a runaway winner.

Didn't know that, Thanks!

> Should probably have a final else: clause here.  It can be as simple
> as throwing an TypeError exception

Yes, that would be nice..

> item = item.replace("'", ''')

Seems to be a good idea.

> replacing and killing of bad bytes with a single call to item.translate()

Tried that, too. unicode.replace(dict) is surprisingly slow.
With the same test case, this scored some 0.180s

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to