gpt4 book ai didi

python - 为什么pygame中的模块事件有内置函数?

转载 作者:太空宇宙 更新时间:2023-11-04 05:20:54 25 4
gpt4 key购买 nike

  print ( type(pygame.event.Event) ) 

在 python shell 中返回它;

  <class 'builtin_function_or_method'>

据我所知,内置函数是唯一由 python 定义的函数。

最佳答案

这是因为pygame.event.Event被转换为 PyCFunction,但是 pygame.Rect例如,被定义为一种类型。

关于python - 为什么pygame中的模块事件有内置函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40363210/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com