Prothon should not borrow Python strings!
Paul Prescod
paul at prescod.net
Tue May 25 10:21:27 EDT 2004
Greg Ewing wrote:
> Paul Prescod wrote:
>
>> The result of reading a file is a binary data string. The result of
>> parsing an XML file is a character string.
>
>
> What if the file you're reading is a text file?
In the most rigorously consistent model, you would decode the data, just
as if you were reading a file that happened to be constructed of a list
of integers.
But of course there are a variety of shortcuts you could implement, like
a "text file" object or a "read as ASCII" flag for a file object or ...
practicality beats purity.
Paul Prescod
More information about the Python-list
mailing list