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
    Greg Wilson (gvwilson@mastodon.social)'s status on Friday, 23-Aug-2024 22:34:08 JSTGreg WilsonGreg Wilson

    This just in from the Ministry of Subtle Bugs:

    def f():
    print("false")
    return False

    result = all(func() for func in [f, f, f])
    print("just comprehension", result)

    only prints 'false' once before printing "just comprehension", but

    result = all(list(func() for func in [f, f, f]))
    print("with list", result)

    prints 'false' three times before printing "with list". I understand why, but damn, this one was hard to spot.

    In conversationFriday, 23-Aug-2024 22:34:08 JST from mastodon.socialpermalink
  • 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.