[Python-Dev] Treating tokenize.Untokenizer as private

Eric Snow ericsnowcurrently at gmail.com
Tue Apr 1 00:37:32 CEST 2014


On Mon, Mar 31, 2014 at 1:45 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> On 3/31/2014 2:30 PM, Eric Snow wrote:
>> Is this still an open question, Terry?
>
>
> It is not currently for #9974 because after consideration of two proposed
> patches (one part of another issue), I decided that the conditions being
> guarded against either could not occur or could be checked in the caller, so
> that no api change was needed.
>
> However, I believe the fix for another bug,
> http://bugs.python.org/issue20387
> will require copying the code that correctly formats indents in the old
> compat method to the newer method, which incorrectly assumes that indents
> are spaces only.  I might end up wishing I could refactor the code. So this
> may well become a live issue again, and I would still like to know what
> people think.

It simply depends on the utility of customizing the default behavior
there.  I seem to remember subclassing Untokenize for something in a
personal project, but I expect doing so wasn't necessary.

>
> How do we do code searches (as for use of "Untokenize") these days?

I believe there was one for which Guido was advocating, but I don't
recall it's name.  Such a search would be useful though.

-eric


More information about the Python-Dev mailing list