From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by gnuweeb.org (Postfix) with ESMTPSA id 63F0981892 for ; Tue, 20 Dec 2022 01:15:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1671498942; bh=DS1JA+oLobhx9uyljbRsW2mZs2TNpJDBkLsqfDHWPhU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kC1ELBBlq2GDMo2s2WHKo+daikKsosUJFv1qXo/X87q1y1HO3BFe0xBk7LnMcVo0j k1uc/wlysi7Mic/e8z2iiWzZvT9Ky10iHAykzdSsDdoJbHp9xCVkq0tXYqUtwzAtnu ZOOQ2+ZlOqj7gM6UyD3Vs8oh0VPnmhsLsKk9YrHE4LwONTjkYnQg4UMapqG6614aEg yJ/zLCyiZvqlWBwyaZvXwV9I5O1a5yJj0IThXhltOozjTZQynWpCz4GyrDHTmmpcWG t8GTJ8TdkDd8/DVn0A2vG8W9saQIipITzC3Eu5Os75WgbaTF6fVWH8FxSVZASgUzF7 fzH6PEvl8Zlig== Received: by mail-lf1-f53.google.com with SMTP id c1so16348747lfi.7 for ; Mon, 19 Dec 2022 17:15:42 -0800 (PST) X-Gm-Message-State: ANoB5pkiLl0uWQmzOi5sudaufqjvCKbiWKZWcwATuK6rSvxT7tNNbfoc 64XR99y8/qqNlPVrdkFbOlsy4f+1uhuKiEEEp0M= X-Google-Smtp-Source: AA0mqf7QfhJsL9Cu0AKGRNqQWQCalTLOtNDs6SQsc3fLoVNJ/xbeMeQfIyt1zP+Wa4HzdT2jBLQx4gUEv2AlcfOZnUY= X-Received: by 2002:a19:770b:0:b0:4b5:798a:9087 with SMTP id s11-20020a19770b000000b004b5798a9087mr8879291lfc.314.1671498940509; Mon, 19 Dec 2022 17:15:40 -0800 (PST) MIME-Version: 1.0 References: <20221219235721.126-1-kiizuha@gnuweeb.org> <20221219235721.126-5-kiizuha@gnuweeb.org> In-Reply-To: From: Alviro Iskandar Setiawan Date: Tue, 20 Dec 2022 08:15:29 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 04/17] fix: utils: Fix the extract_list() utility function To: Ammar Faizi Cc: Muhammad Rizki , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" List-Id: On Tue, Dec 20, 2022 at 7:45 AM Ammar Faizi wrote: > I don't know much about Python, but doesn't that only > work for dict? Or it can use `in` operator too? > > `thread` is an instance of Message class object here. oh ic ic, it doesn't work for the normal class, for ex: class X(): a = 1 b = 2 x = X() print("a" in x) this error: TypeError: argument of type 'X' is not iterable if the Message object is iterable, maybe it can use the "in" operator just like dict and array, but I don't know. Rizki?