REPOST: Re: need help with class of arrays which have attibutes

Rob rob at pythonemproject.com
Fri Dec 28 22:46:52 EST 2001


Emile van Sebille wrote:
> 
> "Rob" <roblytle at ieee.org> wrote in message
> news:pan.2001.12.28.15.45.35.83.2001 at ieee.org...
> > Hi,
> >
> > I'm trying to contruct a class of arrays which have attributes.  This one
> > respresents a wire[] array which can have x,y,z etc coordinates.  I just
> > can't figure out how to do it.  Here is what I have so far:  (it uses
> > Numpy)
> <snip>
> 
> You need to review and work some with classes.  Start with section 9 in the
> tutorial http://www.python.org/doc/current/tut/node11.html and look at the
> __init__ references, which is used to initialize class instances.
> 
> HTH,
> 
> --
> 
> Emile van Sebille
> emile at fenx.com
> 
> ---------

-- 
The Numeric Python EM Project

www.pythonemproject.com


Hi Emile,  I've been reading the books and experimenting with different
kinds of classes, but it just doesn't seem possible to use an array as a
basis for a number of class attributes.  For example,
wire=conductor (i.e. class)  wire[1].x1=30  wire[2].x2=40  etc.    Rob.

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool1-nwblwi.newsops.execpc.com!newsfeeds.sol.net!newspump.sol.net!newsfeed.cwix.com!news.maxwell.syr.edu!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: Rob <rob at pythonemproject.com>
Newsgroups: comp.lang.python
Subject: cmsg cancel <3C2D3C2C.C9EF5AFE at pythonemproject.com>
Control: cancel <3C2D3C2C.C9EF5AFE at pythonemproject.com>
Date: Mon, 31 Dec 2001 01:43:23 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.3C2D3C2C.C9EF5AFE at pythonemproject.com>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009774886 27193 211.57.49.2 (31 Dec 2001 05:01:26 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 05:01:26 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.



More information about the Python-list mailing list