New submission from Michael Newman <michael.b.new...@gmail.com>: formatyearpage is returning "bytes", not "str"
Python 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import calendar >>> calendar.HTMLCalendar().formatyearpage(2009)[0:50] b'<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE h' >>> type(calendar.HTMLCalendar().formatyearpage(2009)[0:50]) <class 'bytes'> # For the time being, to fix it I can use "decode"... >>> calendar.HTMLCalendar().formatyearpage(2009).decode("utf-8")[0:50] '<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE h' >>> type(calendar.HTMLCalendar().formatyearpage(2009).decode("utf-8")[0:50]) <class 'str'> ---------- components: Extension Modules messages: 80030 nosy: mnewman severity: normal status: open title: calendar formatyearpage returns bytes, not str versions: Python 3.0 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4973> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com