On Sun, Mar 13, 2011 at 11:03, Ronald Oussoren <ronaldousso...@mac.com> wrote: > > On 13 Mar, 2011, at 9:52, Lennart Regebro wrote: > >> Distributes from pkg_resources.resource_string returns bytes under >> Python 3, which is pretty surprising. :-) > > That's exactly what the documentation says it will return (the file is opened > in binary mode). This is just one of many legacy APIs in Python libraries > where the naming is pretty lax w.r.t. bytes and text.
Sure, still surprising. I did however just now, when mentioning in real life, realize that we could have a mode flag instead. Simpler and backwards compatible. //Lennart _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig