Re: [Tutor] how to struct.pack a unicode string?

2012-12-31 Thread Steven D'Aprano
I'm digging out an old email which I saved as a draft almost a month ago but never got around to sending, because I think the new Unicode implementation in Python 3.3 is one of the coolest things ever. On 03/12/12 16:56, eryksun wrote: CPython 3.3 has a new implementation that angles for the b

Re: [Tutor] Limitation of int() in converting strings

2012-12-31 Thread Steven D'Aprano
On 23/12/12 04:38, Oscar Benjamin wrote: On 22 December 2012 01:34, Steven D'Aprano wrote: On 18/12/12 01:36, Oscar Benjamin wrote: I think it's unfortunate that Python's int() function combines two distinct behaviours in this way. In different situations int() is used to: 1) Coerce an object