Content-Length: 263640 | pFad | https://github.com/python/cpython/issues/105324

23 python -m tokenize is broken when reading from stdin · Issue #105324 · python/cpython · GitHub
Skip to content

python -m tokenize is broken when reading from stdin #105324

@pablogsal

Description

@pablogsal
 ./python.exe -m tokenize <<< 'f"{F():\n}"'
unexpected error: 'generator' object is not callable
Traceback (most recent call last):
  File "/Users/pgalindo3/github/python/main/Lib/runpy.py", line 198, in _run_module_as_main
    return _run_code(code, main_globals, None,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pgalindo3/github/python/main/Lib/runpy.py", line 88, in _run_code
    exec(code, run_globals)
  File "/Users/pgalindo3/github/python/main/Lib/tokenize.py", line 532, in <module>
    main()
  File "/Users/pgalindo3/github/python/main/Lib/tokenize.py", line 498, in main
    for token in tokens:
  File "/Users/pgalindo3/github/python/main/Lib/tokenize.py", line 527, in _generate_tokens_from_c_tokenizer
    for info in it:
TypeError: 'generator' object is not callable

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/105324

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy