Author r.david.murray
Recipients BreamoreBoy, ezio.melotti, georg.brandl, hynek, markon, o11c, pitrou, r.david.murray, serhiy.storchaka, swarecki, tzimmo
Date 2013-01-14.20:05:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Vis the discussion of x[:0] in the review.  This kind of construct is only unfamiliar because it is new in Python3, and there are not *that* many places that you want to (and can) deal with both bytes and strings using the same code.  But when you can, it is the more-or-less obvious way to write the code.

In this particular case you could also write type(x)().  There are pluses and minuses to both forms, but if any of the rest of the code uses slicing to work around the fact that byte strings index into ints, then I would definitely prefer the slice form.
Date User Action Args
2013-01-14 20:05:45r.david.murraysetrecipients: + r.david.murray, georg.brandl, pitrou, swarecki, ezio.melotti, markon, BreamoreBoy, hynek, serhiy.storchaka, o11c, tzimmo
2013-01-14 20:05:45r.david.murraysetmessageid: <>
2013-01-14 20:05:45r.david.murraylinkissue6975 messages
2013-01-14 20:05:45r.david.murraycreate