-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Description
From rogerbinns on August 15, 2010 18:36:37
Some file objects have an encoding and errors attribute.
They all have a write method.
The write method accepts unicode strings (and in python 2 bytes strings)
Depending on the implementation, calling the write method with a unicode string will result in either:
- The unicode being appropriately converted/used according to how that file object wants to deal with encodings. Note this could legitimately result in a unicode error.
- The file object completely ignoring its own encoding and using ascii instead potentially giving a unicode error.