Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.053 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'looked': 0.10; '(the': 0.15; 'exactly?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.17; 'sort': 0.21; 'trying': 0.21; 'example': 0.23; "haven't": 0.23; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'subject:list': 0.28; 'vector': 0.29; 'class': 0.29; 'implement': 0.32; 'johnson': 0.32; 'print': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'method': 0.36; "i'll": 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'subject:this': 0.84; '2013': 0.84; 'rick': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=sMbVEk1H0IvJvmNajKiJyre5bHz/e0gGJae9zP6wNzQ=; b=HbZi+D4/OY/e3Joe4ZLqzUCNJnwDzZB53LBOMXnypdN3HWcPFNeF8polH7QLhL6Mn+ ROrM+CpwmIes/sI+t2XFo/UEK2C4F2aUATTBIha4OoFHoCSuCNFgvmbaDpCHobK3batc wmhaS042+3VnOg0V/emllx2lSkVy/49fIiL8YbMQbP/aNN7BI60Gpj8HZjWdH7kcwNwy t39gzQoR7JYU9EQw2e+b58wmTEb6lzdym59e77eMTndvhvGmGzBa1178xL7sVnilDBKG 7rOy2JMFNnxkt9MIB9sNNZCfj0f7balQdvPhDK9ccApj8cQfRpOYMvbK5L3pWGcQNNOn JjCg== MIME-Version: 1.0 X-Received: by 10.68.203.33 with SMTP id kn1mr21544387pbc.197.1362280739584; Sat, 02 Mar 2013 19:18:59 -0800 (PST) In-Reply-To: References: <1409c13b-60a6-4e87-a58c-52d5740e74d5@googlegroups.com> Date: Sun, 3 Mar 2013 14:18:59 +1100 Subject: Re: Is it correct this way to inherit from a list? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362280748 news.xs4all.nl 6905 [2001:888:2000:d::a6]:40142 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40391 On Sun, Mar 3, 2013 at 1:30 PM, gialloporpora wrote: > Risposta al messaggio di Rick Johnson : > > >> What are you trying to achieve exactly? > > > > I would like to implement a class (vector) to works with vectors, for > example using scalar multiplication: > a*v = [a*v1, a*vn] > and a dual class for dual vector (the only method that I'll change is the > __str__ method to print it as colun. Have you looked at NumPy? I haven't used it myself, but I understand it's good for this sort of thing. ChrisA