facebook/tornado — pull request #898 by dmitric (2013-09-14 04:15:50+00:00)
Title: Remove binascii import as UUID has hex property

UUID has a read only property called hex, so instead of converting it's bytes property to ascii using binascii#b2a_hex you can call hex directly. Furthermore, binascii isn't used anywhere else in this file.

Under the hood in uuid it's just calling:

@property
def hex(self):
return '%032x' % self.int

The only reason I could think of using bytes to hex conversion with binascii would be because it's actually done in C, but this seems cleaner to me and a uuid isn't a terribly long string.