kwargs.只吃冷杉

2024-09-26 22:12:24 发布

您现在位置:Python中文网/ 问答频道 /正文

Python新手,我觉得这有点让人困惑。我有一个被读入kwarg的配置文件。价值观如下:

 students||student a|student b|student c

当我调试时,我看到它正确地填充到kwarg中,然而,当我尝试读取值时,它总是只拉第一个字母

 for student in kwargs.get('students'):
   --student will come thru as 's'

这似乎是我的机器所特有的,因为这段代码在prod中运行。我将我的库设置为与服务器相同,但仍然存在问题。有人知道为什么会这样吗

我正在运行Python 3.6.5

谢谢


Tags: inforgetas配置文件字母willstudent

热门问题