News for hackers. Stuff that matters.
Re:Python 3 Q&A by a prolific core developer by gardentheory on Friday June 29, 2012 @04:27AM (#4175766)
Well the lighter solution and more Pythonic solution is strong typing. If a Unicode string and a byte string could not be combined then the problem would not exist AFAIK. For example "a" + 1 is an error, why is u"a" + "s" not an error?
Re:Python 3 Q&A by a prolific core developer by masklinn on Friday June 29, 2012 @05:20AM (#4175872)
> For example "a" + 1 is an error, why is u"a" + "s" not an error?

"a" + b"s" is an error in Python 3.

Re:Python 3 Q&A by a prolific core developer by gardentheory on Friday June 29, 2012 @01:33PM (#4177846)
Sorry, that was my point. Strengthening the types in python3 solves the problem without static typing being needed at all.
Re:Python 3 Q&A by a prolific core developer by masklinn on Friday June 29, 2012 @03:05PM (#4178449)
ok.

Static types solve it earlier though, especially for little-exercised code paths which could be forgotten or missed in testing.

Re:Python 3 Q&A by a prolific core developer by xerula on Friday June 29, 2012 @04:31AM (#4175776)
But b"s" + "a" is an error in Py3.
Re:Python 3 Q&A by a prolific core developer by qznc on Friday June 29, 2012 @05:03AM (#4175841)
This just gives a different error message. It does not help to find the error source.

The programmer would probably just try to fix it via str(u"a")+"s" or u"a" + unicode("s").