News for hackers. Stuff that matters.
Re:Why Python 3 Exists by cgrubb on Thursday December 17, 2015 @04:55PM (#10754851)
> You always "encode" something into bytes, and "decode" bytes back into something. There should be exactly two functions, because the functions have different types: "encode" is str -> bytes, "decode" is bytes -> str. Explicit is better than implicit.

I'm not sure "encoding" tells us that the output is bytes. Surely information can be encoded in other ways. Names like .to_bytes() and .from_bytes() might have saved a lot of trips to the documentation.

Re:Why Python 3 Exists by mark-r on Thursday December 17, 2015 @11:05PM (#10756560)
I would use .to_str() instead of .from_bytes(), since the action is from the perspective of the object you're calling it on.
Re:Why Python 3 Exists by viraptor on Friday December 18, 2015 @12:16AM (#10756780)
> Surely information can be encoded in other ways.

Information - yes. Strings... I'm not sure. What other representations are you thinking about?

Re:Why Python 3 Exists by msellout on Friday December 18, 2015 @01:47AM (#10757071)
urlencode(mapping) --> querystring