Jul-26-2018, 02:45 PM
Hi everyone,
I am making a suggestion to allow a no-op 'b' prefix for variables of type 'str' in python 2. Hopefully we can get this change in before python 2 is no longer supported.
Personally I make it a point to write code that is compatible with both python 2 and 3. This is very doable (even for the print statement as long as you only pass a single argument), but I still run into problem with open(..."b") and struct.pack in python 3 because of the new byte types. It would be great if I could write python 3 code with the 'b' prefix that also worked in python 2 (at least not crash from the syntax error).
Thanks!
I am making a suggestion to allow a no-op 'b' prefix for variables of type 'str' in python 2. Hopefully we can get this change in before python 2 is no longer supported.
Personally I make it a point to write code that is compatible with both python 2 and 3. This is very doable (even for the print statement as long as you only pass a single argument), but I still run into problem with open(..."b") and struct.pack in python 3 because of the new byte types. It would be great if I could write python 3 code with the 'b' prefix that also worked in python 2 (at least not crash from the syntax error).
Thanks!