在为我的作业提供给我的示例代码中,此行显示为:
date_format = locale.nl_langinfo(locale.D_FMT)
Run Code Online (Sandbox Code Playgroud)
但在Windows中该行返回以下错误:
File "C:\Users\Shadark\Dropbox\IHM\P3\p3_files\www\cgi-bin\todolist.py", line 11, in <module>
date_format = locale.nl_langinfo(locale.D_FMT)
AttributeError: 'module' object has no attribute 'nl_langinfo'
Run Code Online (Sandbox Code Playgroud)
我读过有关使用localeconv的内容,但我只读到它使用的货币或数字.关于我的代码示例或其他类型函数的用途的任何想法?
提前致谢.