GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    Gabriel Pettier (tshirtman@mas.to)'s status on Sunday, 26-May-2024 17:59:22 JSTGabriel PettierGabriel Pettier
    • Tokyo Outsider (337ppm)
    • C.

    @tokyo_0 @cazabon "and" and "or" will short-circuit if the first part is enough to know the result.

    >>> def spy(value):
    ... print("called with", value)
    ... return value
    ...
    >>> spy(True) or spy(False)
    called with True
    True
    >>> spy(True) and spy(False)
    called with True
    called with False
    False
    >>> spy(False) and spy(True)
    called with False
    False

    so "in" will only be called if the value before the and is "truthy", which means that bool(value) returns True.

    In conversationSunday, 26-May-2024 17:59:22 JST from gnusocial.jppermalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.