Re: [Tutor] Hiding Superclass Methods

2010-10-11 Thread Denis Gomes
I understand where to go from here. Thanks to all who responded. Appreciate it. Denis ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Hiding Superclass Methods

2010-10-11 Thread Denis Gomes
point me to something. Denis On Mon, Oct 11, 2010 at 4:13 AM, Alan Gauld wrote: > > "Denis Gomes" wrote > > > I have a basic python question. I am writing an n dimensional vector >> class by inheriting from the builtin python list object. I want to be >> abl

[Tutor] Hiding Superclass Methods

2010-10-10 Thread Denis Gomes
Hi Everyone, I have a basic python question. I am writing an n dimensional vector class by inheriting from the builtin python list object. I want to be able to hide the parent object's methods in the derived class instances. I know I can overload the method in the derived class and raise some

Re: [Tutor] Trouble with exercise regarding classes

2010-08-25 Thread Denis Gomes
Andrew, For starters you have some errors in the way you are trying to access methods from within a class instances. For example in your code in line 7 and 8, def main(): angle, vel, h0, time = getInputs() cball = Projectile(angle, vel, h0) zenith = 0.0 while cball.getY() >=

Re: [Tutor] Function object

2010-08-25 Thread Denis Gomes
Daniel, Considering that Python is your first programming language, let's start from the absolute beginning. Before you think about what a function object is, try to understand what a function is. A function is a series of python commands put together under a common heading or name in order

Re: [Tutor] Writing a prime number program using upper bound of square root of n

2010-08-22 Thread Denis Gomes
, 2010 at 5:10 PM, Nick wrote: > I will play with this and see what happens. One question though, [x for > x in xrange(2,n) .. what is xrange or is this an error? > -- > *From:* Denis Gomes [denisg...@gmail.com] > *Sent:* Sunday, August 22, 2010 4:07