Home
Sign Up
Sign In
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
pid = user and
user.id
or False
jacklong
·
jack-long
·
Feb 4, 2015
· 3480 views
This topic created in 4314 days ago, the information mentioned may be changed or developed.
python中逻辑运算从左到右进行,and运算返回第一个假值,若都为真则返回最后一个真值。or运算返回第一个真值,若都为假则返回最后一个假值。
运算
返回
user.id
2 replies
ryd994
Feb 5, 2015 via Android
1
1
乖乖用括号……
你这样除了给其他人考语法之外,没有任何意义
jacklong
OP
Feb 5, 2015
2
@
ryd994
Readability counts.
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
1109 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 32ms ·
UTC 23:41
·
PVG 07:41
·
LAX 15:41
·
JFK 18:41
♥ Do have faith in what you're doing.
❯