There appear to be two different ways to convert a string to bytes, as seen in the answers to TypeError: 'str' does not support the buffer interface
Which of these methods would be better or more Pythonic? Or is it just a matter of personal preference?
b = bytes(mystring,'utf-8')
b = mystring.encode('utf-8')