python源代码中str.casefold((方法的实现在哪里?我搜索字符串";casefold";在github存储库cpython中。我找到了一个测试,但没有找到方法的定义。
https://docs.python.org/3/library/stdtypes.html#str.casefold
https://github.com/python/cpython
https://github.com/python/cpython/blob/83d544b9292870eb44f6fca37df0aa351c4ef83a/Lib/test/test_unicode.py#L829
casefold调度器在那里实现,您只需查找它所调度的函数即可。
https://github.com/python/cpython/blob/f4c03484da59049eb62a9bf7777b963e2267d187/Objects/unicodeobject.c#L10967