Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我是来很严肃的来讨论文章中一个问题的 #2

Open
onlyxuyang opened this issue Oct 5, 2015 · 3 comments
Open

我是来很严肃的来讨论文章中一个问题的 #2

onlyxuyang opened this issue Oct 5, 2015 · 3 comments

Comments

@onlyxuyang
Copy link

return practice ? '1 week' : 'never'
这个有问题…… c++和c应该都不支援单引号字符串语法,python虽然支持但是puthon没有?:的三元运算符… 到底哪些语言可以正确的使用上面这一句呢? javascript好像可以? 还有其他语言没……

@frantic1048
Copy link

JavaScript:可以。

@lilydjwg
Copy link

除此之外还有 Ruby 和 AWK。

@waters00
Copy link

python 有这个

return '1 week' if practice else 'never'

感觉更易读了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants