Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 675
    • Issues 675
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPyPyPy
  • pypypypy
  • Issues
  • #3404
Closed
Open
Issue created Feb 21, 2021 by Matti Picus@mattipOwner

Cython + f"type of a is {type(a)}" does not work

This fails:

cat << EOF
def func(a):
    print(f"an f string {type(a)}")
EOF
bin/pypy -m cythonize test_fstring.pyx -b
bin/pypy -c "import test_fstring; test_fstring.func('as')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "test_fstring.pyx", line 2, in test_fstring.func
    print(f"an f string {type(a)}")
TypeError: __format__() missing 1 required positional argument: 'format_spec'
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking