Deutsch English Français Italiano |
<mailman.181.1719692939.2909.python-list@python.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Mats Wichmann <mats@wichmann.us> Newsgroups: comp.lang.python Subject: Re: Difference method vs attribut = function Date: Sat, 29 Jun 2024 14:03:13 -0600 Lines: 11 Message-ID: <mailman.181.1719692939.2909.python-list@python.org> References: <20240628180854.7ee713db744e9672ad668f36@fam-goebel.de> <5804d7a6-c434-4e03-bf44-f84f836536dd@wichmann.us> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de b5e090XSeVNixW0OKiLtagz6m4rNBQq8AWl+oouGAxhg== Cancel-Lock: sha1:hR1XavK923HUvzrfjIwiHLV1kIo= sha256:YPmB9Mjr13c78x3ZtA8Uj8QTZmEcwuDXreVKuQDrbzY= Return-Path: <mats@wichmann.us> X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org Authentication-Results: mail.python.org; dkim=pass reason="1024-bit key; unprotected key" header.d=pobox.com header.i=@pobox.com header.b=o1ZklbQP; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Status: UNSURE 0.212 X-Spam-Level: ** X-Spam-Evidence: '*H*': 0.59; '*S*': 0.01; 'instances': 0.09; 'received:64.147': 0.16; 'subject: = ': 0.16; 'wrote:': 0.16; 'to:addr:python-list': 0.20; 'bit': 0.27; 'header:User-Agent:1': 0.30; 'context': 0.32; 'python-list': 0.32; 'header:In-Reply- To:1': 0.34; 'trying': 0.35; 'complex': 0.35; 'understood': 0.35; 'functions': 0.36; 'received:192.168': 0.37; 'could': 0.38; 'want': 0.40; 'url-ip:104.21/16': 0.61; 'here': 0.62; 'pass': 0.64; 'look': 0.65; 'received:64': 0.67; 'per': 0.68; 'subject:method': 0.69; 'database': 0.80 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=message-id :date:mime-version:subject:to:references:from:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=YcUhynknUrQ7 q7FTqG+ZSD5jEXD6H5VDNb4MwcOhBRo=; b=o1ZklbQPL/3hOv+m26QNbiomqjuy r1bitY5Qbie7xEDJkEgPU2WHSAO5YQFnt+xXhRyGZRxgzSbbSuJqoDyaSPej7yGV 69lMD3hkSqZ7I+iHv+HdN8y7FWxH8pifrkNHupXP0EzhV5Yl1l+Cel7WVNN4umUH QZltUZI1GIwMh8E= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=wichmann.us; h=message-id:date:mime-version:subject:to:references:from:in-reply-to:content-type:content-transfer-encoding; s=2018-07.pbsmtp; bh=YcUhynknUrQ7q7FTqG+ZSD5jEXD6H5VDNb4MwcOhBRo=; b=arjwdrxuAVaANuL90YkrM3OWB+HKSHmt9NdaGAvAVECb5KXZy7mauMrQKmk1zenBOotEMknBS9Qx3tuOyX3unqE8nTivG6TCFHNqMBp/jX9Rf5XcgKSujc9s35YXAUsYcz13+t6Ph58dFDhNIAGQ4jmCBa+dhGJh7I5H7bkcRIY= User-Agent: Mozilla Thunderbird Content-Language: en-US Autocrypt: addr=mats@wichmann.us; keydata= xsDiBD9xp6oRBAC1vd3YI8Gcr1CxpV1gldNQu0uQsNaICDk+Ai3+R163s/P83JOYG+SBEA3P v7iZx70qpQ3RzP7KrjF1Nm6j0em9ccUX2fPQUCAxXw5Hiq7CSMiwQQZRI6shcnyMh9XTKViT WK5MrKDyvjDEn7epjKzKwPS5SG039l6XaOKU0A4uGwCgsNqUQqC0gMMcbKlJV8ql58iKmbMD /ii8FPQrXmyS/FnsPs7UddV5qMHKm7NUH5oiKuMVyakInRyq9iIxuu3D4Ec6mWRKcGsjmIkW HXCSz0aefs6dsqNqpU54cYioJ3wP5LzHK7oclgJPryVt5Qezbdutf8SQf8gVkaNIlkxwGUzi bKTZ6CHzwlz9nNgeel0XPUcZzFxGA/4paeCg2rMSVuAhUQbsLYHu4XzTs9P16zaXkrtxc4m5 b+BF5xsLgTpyO5l859XudS2Gp+7/Y37dAU4QlyGGOboWmF1y9U5DnzBwG8ghsnym+ga58MJh LdRdQQ6xQolCpEXOuzm40f2r5uMxF3KOJ7WpIPuGAkeCPru9BmlATH+zOs0gTWF0cyBXaWNo bWFubiA8bWF0c0B3aWNobWFubi51cz7CYQQTEQIAIQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIX gAUCT0VyZwIZAQAKCRDAMaCQc9hUxiZBAJ9cWziGp7hVfsu5T+cQptc3rLNndQCgrZh8u5LW BfJ5e/Y+3PwZ8UEm+ELOwE0EP5is8BAEAMtwzcA8TYf5UTjDMgwcSNoErTc9ag+IX05QFgL8 aF8sfJRv5atcitqQy0gSIsOzI+L/AFdPN/+QQI3dL1tCq14t32KPDtigDhzm6jVPXX5z+V9u xnD8XTp+ZvNcWoHXjViM8aXeLLEiCpiVCho307h3XShvqoKINWRQWeAsKKDDAAMFA/48zaey wiiEyvI0meJ1KkNHxdLP0yLODr1WV6j9xkPkLWOaIDw7dlwEOlF1N1YtZ2wa0p1wsttdIbIx ffgwXmcH4zrdxUIMz3U0BqYzk5H+5cYFXECXTFVOmweS+JECYMj80PjRoKCO1eVO1N30zksB 36NnhZWPRWIhjK3ZarIYH8JGBBgRAgAGBQI/mKzwAAoJEMAxoJBz2FTG6VEAoKDYHfDp5Q3q PuPvPahCE9HsXMgAAJ9INTqcLSJrOfyJ8q95nBO1T26H2Q== In-Reply-To: <20240628180854.7ee713db744e9672ad668f36@fam-goebel.de> X-Pobox-Relay-ID: 9E8E2160-3652-11EF-B9BA-5B6DE52EC81B-81526775!pb-smtp1.pobox.com X-Mailman-Approved-At: Sat, 29 Jun 2024 16:28:57 -0400 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: <5804d7a6-c434-4e03-bf44-f84f836536dd@wichmann.us> X-Mailman-Original-References: <20240628180854.7ee713db744e9672ad668f36@fam-goebel.de> Bytes: 5384 On 6/28/24 10:08, Ulrich Goebel via Python-list wrote: > By the way: in my usecase I want to pass different functions to different instances of MyClass. It is in the context of a database app where I build Getters for database data and pass one Getter per instance. If I understood what you're trying to accomplish, you could take a look here (possibly a bit complex for what you need). https://refactoring.guru/design-patterns/strategy/python/example