Close #16665: improve documentation for hex().  Patch by Jessica McKellar.