Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Hartmut Goebel Newsgroups: de.comp.lang.python Subject: Re: [Python-de] Konstanten in Struct-Form in Python Date: Fri, 19 Feb 2021 15:43:39 +0100 Organization: crazy-compilers.com Lines: 22 Message-ID: References: <1185652d-c786-727c-7d64-d10ad8cd44ec@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de pYH44nal0qJUK/8r0GxPBgtOc1R53+heniNwkAKLZXag== Return-Path: X-Original-To: python-de@python.org Delivered-To: python-de@mail.python.org Authentication-Results: mail.python.org; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Virus-Scanned: amavisd-new at mnet-online.de User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 In-Reply-To: Content-Language: de-DE X-BeenThere: python-de@python.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Die Deutsche Python Mailingliste List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1185652d-c786-727c-7d64-d10ad8cd44ec@crazy-compilers.com> X-Mailman-Original-References: Xref: csiph.com de.comp.lang.python:5718 Am 19.02.21 um 15:27 schrieb Michael S.: > Was mich dran nervt ist, dass jede einzelne CAN-Botschaft eine eigene > Klasse ist und ich die im Code erstmal instanzieren muss, bevor ich > sie nutzen kann. Das muss doch auch einfacher gehen Mache Klassen-Variabblen draus: class CAN_AC_Voltage:     ID = 0x16FC8B11     BitOffset = 48     BitLength = 8     Gain = 1     ValueOffset = 0     Unit = "V"     Rate = 0.5 -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |