Giter VIP home page Giter VIP logo

Comments (4)

chinesehuazhou avatar chinesehuazhou commented on July 17, 2024

PEP-308 有相关讨论,阅读中!

维基百科有其它语言的设计方案,中文不全,查阅英文版

备忘:Go语言没有,设计者有专门的解释;rust 也没有

from python-whydo.

chinesehuazhou avatar chinesehuazhou commented on July 17, 2024

相比于使用 if then else 等写法,if 开头在阅读时很清晰表明用途。非 if 开头时,后知是条件操作

变量赋值与函数返回值,两种场景观感不同。return 加条件,不如 return 加值,即 Python 在这种情况更可读

第一次见?:语法,不可能知道含义。使用 if 表达则含义清楚。

?符号可以保留在其它语法中使用

from python-whydo.

chinesehuazhou avatar chinesehuazhou commented on July 17, 2024

programming faq 有一个问题,在 2.5 前 不安全的 and or 写法

from python-whydo.

chinesehuazhou avatar chinesehuazhou commented on July 17, 2024

已发布:https://github.com/chinesehuazhou/python-whydo/blob/master/zh_CN/28-why-not-support-ternary-operator.md

from python-whydo.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.