Unicode coercion not the same as ASCII
dale at out-think.NOSPAMco.uk
Sat Dec 9 15:12:04 CET 2000
Is there a particularly good reason for this apparently inconsistent behaviour?
Traceback (innermost last):
File "<interactive input>", line 1, in ?
TypeError: coercing to Unicode: need string or buffer, int found
To get a number represented as a Unicode string, do I really need to do this?
When working in ASCII it is handy to be able to stuff anything into str() to get a readable
representation of it.
When working in Unicode, you have to test datatypes and treat them differently which isn't very
Business Technology Consultants
More information about the Python-list