Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法强制 urlparse 的 urlsplit 函数保留传入的 str 的大小写?它保留了返回元组中路径的大小写,但不保留 netloc 的大小写,这对我很重要。(我知道域名不区分大小写,但是,我们正在使用不同的名称大写进行一些 A/B 测试,并且需要保留大小写。)
谢谢。
没有办法强制 urlsplit 这样做。
但是,您可以将其包装起来,然后做一些肮脏的工作来恢复大小写,或者复制源代码并自己进行修改。当然,或者从头开始编写函数。
我会选择第二个选项。
I am currently attempting to add a listener to my button so that when it is clicked it loads what is in the 'textId' textfield into an html text above said textfield and button. This is so th