Deutsch English Français Italiano |
<mailman.10.1733312315.2965.python-list@python.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Roel Schroeven <roel@roelschroeven.net> Newsgroups: comp.lang.python Subject: Re: super().__init__() and bytes Date: Wed, 4 Dec 2024 12:38:33 +0100 Lines: 18 Message-ID: <mailman.10.1733312315.2965.python-list@python.org> References: <3cc6272f-b151-474a-a83c-7f3339734bf5@roelschroeven.net> <ce4e0a1b-229a-48ad-b256-5835e0e509cc@roelschroeven.net> <VI1PR05MB106809E93AA17A3D46E380DFEB4362@VI1PR05MB10680.eurprd05.prod.outlook.com> <c5901834-52b0-4238-bda1-6b74220be68d@roelschroeven.net> <mailman.6.1733235899.2965.python-list@python.org> <lr9hm9F77vdU1@mid.individual.net> <b688c6ff-dc65-4649-9064-f0b6d0a90d94@roelschroeven.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de 7MnghdafiHgJdHwfThKz5Qdjm5E4xUbxKPSFaxdI4wUw== Cancel-Lock: sha1:EwjwYRpc/PMQLzqmcSUTtc8x7/E= sha256:Eh+S95SsdEJ5eCi6XyyXIE9VuoV80xWlimDh0enePGk= Return-Path: <roel@roelschroeven.net> 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=roelschroeven.net header.i=@roelschroeven.net header.b=ltUgMmX2; dkim-adsp=pass; dkim-atps=neutral X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'confirming': 0.09; 'roel': 0.09; 'schroeven': 0.09; 'window.': 0.09; 'that.': 0.15; '"in': 0.16; 'builtin': 0.16; 'explaining': 0.16; 'greg': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.163': 0.16; 'received:internal': 0.16; 'received:messagingengine.com': 0.16; 'schreef': 0.16; 'subject:() ': 0.16; 'subject:super': 0.16; 'wrote:': 0.16; 'python': 0.16; 'to:addr:python-list': 0.20; "wasn't": 0.26; "isn't": 0.27; 'old': 0.27; 'header:User-Agent:1': 0.30; 'am,': 0.31; 'objects': 0.32; 'technology,': 0.32; 'window': 0.32; 'but': 0.32; 'header:In- Reply-To:1': 0.34; 'able': 0.34; 'same': 0.34; 'yes,': 0.35; "it's": 0.37; 'though': 0.37; 'thanks': 0.39; "that's": 0.39; 'methods': 0.39; 'skip:b 10': 0.63; 'me.': 0.64; 'clear': 0.64; 'days,': 0.69; 'received:202': 0.69; 'writers': 0.69; 'front': 0.70; 'implemented': 0.76; 'sure.': 0.84; 'adams': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= roelschroeven.net; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1733312312; x=1733398712; bh=hVjpma3bmFqtQY+vLHS14 dyih9buW1c7BZBAuF73DL4=; b=ltUgMmX2pKEDsN7hpgVx2etxpOxwgz9iwd6fV WHJjl0BCJPw7TOZRgO7PdYW4Nyashv820/z/Y8ot7+rsPwPW0Ho10+ZbWS+xX7QW AQtpoy8nJKszA0qRTLtMIFzNxu2qO3Jsgda1hiIYCCJ3d5GX+CRH8U1Jsv0hDjPx FyNS0lWhh0ENZWVXQTNXdAZXPhPxo+RzbfnivG0fEXRlTx0r3scK9dIe+7/iq5hi UbS/xQutLG6ngikeAQDN91uIzAFCg3bbuHKy3pI+z8LT5r3w+m+hdJ4bjdR4AFwS 0yuztAeQNaltxI9VlMv4BT35VdhT4IHMuoytStEk6Zf6xuVCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1733312312; x=1733398712; bh=h Vjpma3bmFqtQY+vLHS14dyih9buW1c7BZBAuF73DL4=; b=X7ru5dQIs06t6tUId 2BCBQT1l8Hxwp3RwHjewsMZERAWSHcdFk416sfAavH7G0FMS00im5qvRauyijJd1 GkYerWlTdGSfuYtU6B1lEIxBqCR23xAxNJ5M/5pdFMcSKw8cveal2FB0qPpa4FFh CnaP35C6Lx3Fb0HIW5UXmhR88tHoW1JPNhmX9wv5IIcxTp9USrTlHyZM5r2H92wo ukhn2AKYaWE4XQxiphKSgyoe0EAG8R2zyw3ZX1ztNFt4oT6Zf19Y+15ZUxRM1ZNc q95aQl9rDT7O7Ar4omckG61Ps2r+zN8g5IvkPFK36bhl72y9ubs6GIeZSon9qydE S2Scg== X-ME-Sender: <xms:Nz9QZ4CbhZI4qS8GfFnQl0hfB0DDZCIPMa6pyJ6aizYUUITPe0wjbQ> <xme:Nz9QZ6hRjg50ARHElsgR105w79sCM4BMvypmgdsn38j_G9Z5sCsei6CH_YQBTSteV Vc4z0aTRcjj> X-ME-Received: <xmr:Nz9QZ7kMNv4YNfFvkqYp7cHNSjACVwOYb2TK7GzzFtcFPBwFxVGiCM2grnR8aFlazD_JRyMqjmjdQdS_y8j1VX6ERIyktW4> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrieehgddvjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuf fvfhfhjggtgfesthekredttddvjeenucfhrhhomheptfhovghlucfutghhrhhovghvvghn uceorhhovghlsehrohgvlhhstghhrhhovghvvghnrdhnvghtqeenucggtffrrghtthgvrh hnpeegjeffkeegvdevjeejhfegtddvhefhiefhleefhffgiedtvdeigeeiieegvdduhfen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrohgvlh esrhhovghlshgthhhrohgvvhgvnhdrnhgvthdpnhgspghrtghpthhtohepuddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepphihthhhohhnqdhlihhsthesphihthhhohhnrd horhhg X-ME-Proxy: <xmx:Nz9QZ-wM4Tm94U4u9_CRmb9sdBdtfjVWcNUxrQraHvdVpuTDWfzbfA> <xmx:Nz9QZ9RMQqTZ-dZEvmNAEs7UJKvf94-1bY_QUUpGca0BF6R1GzNYUA> <xmx:Nz9QZ5bKl60SwjFVEjBeBK3vojX9U5FGPJb67xilN9u7SArPAnn-fQ> <xmx:Nz9QZ2SXiZI7lhw44ekGOElE5Fccug8D3qlSr1wCfEII9J0_Dt3omw> <xmx:OD9QZ8JJfMoyxzkt5MVt_oAeG1cym32al9B-mEwp4FoiCIOMdVXX8cOI> Feedback-ID: i8e5b41ae:Fastmail User-Agent: Mozilla Thunderbird Content-Language: nl In-Reply-To: <lr9hm9F77vdU1@mid.individual.net> 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: <b688c6ff-dc65-4649-9064-f0b6d0a90d94@roelschroeven.net> X-Mailman-Original-References: <3cc6272f-b151-474a-a83c-7f3339734bf5@roelschroeven.net> <ce4e0a1b-229a-48ad-b256-5835e0e509cc@roelschroeven.net> <VI1PR05MB106809E93AA17A3D46E380DFEB4362@VI1PR05MB10680.eurprd05.prod.outlook.com> <c5901834-52b0-4238-bda1-6b74220be68d@roelschroeven.net> <mailman.6.1733235899.2965.python-list@python.org> <lr9hm9F77vdU1@mid.individual.net> Bytes: 7237 Op 4/12/2024 om 0:14 schreef Greg Ewing via Python-list: > On 4/12/24 3:24 am, Roel Schroeven wrote: >> It's not entirely clear to me though how bytes.__new__ *can* set an >> object's value. Isn't __new__ also a regular function? > > Yes, but the __new__ methods of the builtin immutable objects (int, > str, bytes, etc.) are implemented in C, and so are able to do things > that Python methods cannot. Aha, yes, that's what I already suspected, but I wasn't sure. Thanks for confirming that. All clear now. Thanks to Anders and Greg for explaining this to me. "In the old days, writers used to sit in front of a typewriter and stare out of the window. Nowadays, because of the marvels of convergent technology, the thing you type on and the window you stare out of are now the same thing.” -- Douglas Adams