Deutsch   English   Français   Italiano  
<mailman.92.1737391296.2912.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail
From: =?UTF-8?B?44GC44GG44GH44GP44KN?= <deqser25@gmail.com>
Newsgroups: comp.lang.python
Subject: bool type have big problem. finally program returned "True".Is this
 the TRUE spec?
Date: Sat, 18 Jan 2025 21:55:56 +0900
Lines: 17
Message-ID: <mailman.92.1737391296.2912.python-list@python.org>
References: <CAAoNPLevMbMzeuCRKDqY2n6Wg2=fkSUohHEGAhN0tS83hne07Q@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de +i+fZXQmL7/LhqcCw18fuwKOD9wdeSa/WCNS7b0596rA==
Cancel-Lock: sha1:sk7SoCE9/WlvGaHrLO1wcy8kFeQ= sha256:CASSCTGVV4tQS0NSeIEM6oHdvwkVwIZBzy4OgeywV5I=
Return-Path: <deqser25@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
 reason="2048-bit key; unprotected key"
 header.d=gmail.com header.i=@gmail.com header.b=iBoM+EA2;
 dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.161
X-Spam-Level: *
X-Spam-Evidence: '*H*': 0.75; '*S*': 0.07; 'def': 0.04; 'import':
 0.15; '<': 0.16; '->': 0.16; 'lambda': 0.16; 'subject:True':
 0.16; 'subject:program': 0.16; 'typing': 0.16; 'subscribed': 0.19;
 'to:addr:python-list': 0.20; 'raise': 0.31; 'message-
 id:@mail.gmail.com': 0.31; 'but': 0.32; 'received:google.com':
 0.34; 'from:addr:gmail.com': 0.34; 'list': 0.39;
 'from:charset:utf-8': 0.64; 'skip:t 20': 0.65; 'subject:this':
 0.67; 'types': 0.67; 'subject:. ': 0.73; 'subject:have': 0.75;
 'skip:f 20': 0.75; 'subject: \n ': 0.84; 'subject:returned': 0.84;
 'subject:type': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1737204968; x=1737809768; darn=python.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=xeqfesfzg9kLrOoXqdekd0PhTQS/uevz9vDoCpzFwCI=;
 b=iBoM+EA2M9blZ4yzMQUsUZLPaLsWywxs5nHt1o7ixj4zefvc2rIm79DidQ/DUno1c/
 YEKutVLB7thl9R+8op4aJ7WTYlNURWYhsZ37lcbl1ApTDQjX+C1MnEKHOqfFdda72lLh
 eafihPIomlfzVTkpUws27z7lBSa1j0TYTRjn5hN+JRxZ0h1aV/A7fsQSe92uaojBBSai
 6QhdXNep2RF8f5hv5VuwM+cQtpLulBmcVDi1JVtaH29F7xzMiZZRJA7CsGSdQuOFHUBs
 hXdA9EgRVPsNhLwaXjbduQaMR47rEF9H3lK/XBVDGo2+Dh3r9fWMWWNVFgLxL0FANFvc
 +GAg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1737204968; x=1737809768;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=xeqfesfzg9kLrOoXqdekd0PhTQS/uevz9vDoCpzFwCI=;
 b=U2bmc3EWvwS5PZpXDKcaUm2hPH09gWHX6h3mid7snS+xVXES1gUMMoVeaeWSbVWHUd
 nfXZgXtfFtXcCjYC+IqEfdHN6RsvWEs6LNuT8jrzHjQHO587eCiLbu3OdirOCY6t06ve
 zO+so6E9UvNUUgNwfG2Sq5p6gBIo49npxuCXBwZflGuASlgrbPYStowxpoj+tNU1fQsB
 mMCyn2X/6QydYI2YJ/J74etJ0mSNNI0qJReA6wwqFT+MHDx+3Zc7ChQxo/wOdvUr/gYw
 z6VKeQRtHtp+WNpOYhew6H7rUrqAX2YuQwqB6yrRWHQMqqmHiIf05BKOF8dGZa1/o61e
 LDvQ==
X-Gm-Message-State: AOJu0Yy9sD9YDG/NiY3WdIYusD7eSzcv17vi+DJMb8xf3ZiU8CpqwCpK
 WusPJ420K+6Y7on1QstCnZJXGPM8jONaKNVc/NRVbFDe7p2powjiHnFE6YVYKxp7+zu9SDRXZoi
 4A1/RIdRlkKmZQcI0rMIpxM3nSLc9Ya9P
X-Gm-Gg: ASbGncsPhYXtGhJbvlBOw3DNOD4thqeEkcC/waBJPZmATfrmDL9P9bilEjFTEkpEmxT
 AEKcXF5YYE1DqWbK+8Eox0RopgSlDtk899nGfC6rJQFE1rJOW0F9/28ncW2cBtZVBkts870SWYB
 VDyHcnyjM1RA==
X-Google-Smtp-Source: AGHT+IEarbbjabdusQA0VIiFOSDWAyqwNCPHPjj6EpPqZ7YhX8TYZzqMRC3I/2bflowGcUgByQ6+gV81oeTvBDSb3zA=
X-Received: by 2002:a05:6402:27cc:b0:5d4:5e4:1561 with SMTP id
 4fb4d7f45d1cf-5db7d828becmr5697362a12.20.1737204968244; Sat, 18 Jan 2025
 04:56:08 -0800 (PST)
X-Gm-Features: AbW1kva_MUFae1D_4NqZZYvh2lEQsHAfGEhTF2YQOszSHPynG9WeYpeVHXYgu4s
X-Mailman-Approved-At: Mon, 20 Jan 2025 11:41:35 -0500
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
 <python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
 <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
 <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAAoNPLevMbMzeuCRKDqY2n6Wg2=fkSUohHEGAhN0tS83hne07Q@mail.gmail.com>
Bytes: 5051

from typing import List
from types import FunctionType, LambdaType


def composite(*func: List[FunctionType]) -> LambdaType:
if len(func) < 2:
raise TypeError(f'composite expected over 2 arguments, but got {len(func)}')
if len(func) == 2:
return lambda *args, **kwargs: func[1](func[0](*args, **kwargs))

return lambda *args, **kwargs: composite(*func[1:])(func[0](*args, **kwargs
))
tpr=composite(type,print)
print(tpr('a')==tpr(1))

I subscribed to python-list, so I sent this message again.
Why does tpr('a')==tpr(1) return True?