V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
bianz103
V2EX  ›  Python

sqlalchemy 请教

  •  
  •   bianz103 · 2019-12-14 21:41:32 +08:00 · 2700 次点击
    这是一个创建于 1566 天前的主题,其中的信息可能已经有所发展或是发生改变。

    python 函数参数可以为普通参数,列表,字典,看到 sqlalchemy 里面参数为 user_table.c.id == 5 这种检索方式,请问这是什么形式的语法?

    1 条回复    2019-12-14 21:53:03 +08:00
    n121
        1
    n121  
       2019-12-14 21:53:03 +08:00   ❤️ 2
    Python 可以重载操作符,user_table.c.id == 5 等于 user_table.c.id.__eq__(5)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5937 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 02:07 · PVG 10:07 · LAX 19:07 · JFK 22:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.