Python 中 urlparse 中的方案 'c' 是什么?

What is scheme 'c' in urlparse in Python?

我认为这是一个错误,因为文档 does not mention anything about a scheme 'c'

为什么下面代码的输出是'c'?什么是方案 'c' ?如前所述,方案 'c' 在文档中不存在。

from urllib.parse import urlparse

print(urlparse('C:/ProgramData/Anaconda3/lib/site-packages/impala/thrift/ExecStats.thrift').scheme)

顺便说一句,我正在使用 Anaconda3。

垃圾进,垃圾出。

您已告诉 urlparse 解析不是 URL 的内容。 urlparse 尽力了。在这种情况下,C: 看起来像一个 URL 方案说明符,就像 http://blah.blah.blah/... 中的 "http:",所以 urlparse 决定方案是 c .