[issue9969] tokenize: add support for tokenizing 'str' objects

Nick Coghlan report at bugs.python.org
Wed Sep 29 22:46:43 CEST 2010

Nick Coghlan <ncoghlan at gmail.com> added the comment:

As per Antoine's comment on #9873, requiring a real string via isinstance(source, str) to trigger the string IO version is likely to be cleaner than attempting to duck-type this. Strings are an area where we make so many assumptions about the way their internals work that duck-typing generally isn't all that effective.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list