On Tue, 16 Oct 2012 10:30:54 +0100 Alan Gauld wrote
Yes but then it wouldn't be OOP. You'd be back in the world of
traditional procedural programming passing explicit data references
around. Its much better to make it an instance method with the self
reference being passed implicitly
I
here.
thank you Steven
---
On Sun, 14 Oct 2012 16:21:38 +0100 Alan Gauld wrote:
On 14/10/12 13:34, Osemeka Osuagwu wrote:
I understand instance, static and class methods but I'm still
struggling with when and where they should be used.
You can pretty much ignore static
Hello people,
Firstly, thank you so much for all the assistance you provide so
selflessly through this medium.
I come from a functional programming background and have only recently
become serious with OOP.
For practice, I tried to implement John Conways 'Game of Life' without
a GUI and ran into
Dear Pythonistas (I hope you don't mind that),
I wrote the following code to find the four adjacent numbers (in any
direction in the array) which, when multiplied together, would yield the
highest product to be gotten. I finally stumbled on the answer while
studying the data itself but I'm still
Dear Mark,
I can't see a Python array anywhere. Do you mean the list of lists? :)
THE CODE
[snipped as it's been mangled, was it posted in html and not plain text
or what? I'm too lazy to unmangle it, others might be kinder]
Again, my bad. Here's the code in plain text:
Hi folks,
I've been trying to convert numbers from digits to words, I wrote the
following code;
units = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',
'nine']
teens = ['eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen',
'seventeen', 'eighteen', 'nineteen']
tens =
Hi,
I am trying to find the smallest positive number that is divisible by all
of the numbers from 1 to 20 without a remainder. I wrote the following code
(implementation of a solution method found in
http://en.wikipedia.org/wiki/Least_common_multiple#A_method_using_a_table )
but kept getting an
Sebille)
4. Bothersome NoneType Error for a List object (Osemeka Osuagwu)
5. Re: Bothersome NoneType Error for a List object (Steven D'Aprano)
6. Re: Seeking help with reading and writing files in Python
(Alan Gauld
] Bothersome NoneType Error for a List object
Message-ID: jt1tk0$fnd$1...@dough.gmane.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 04/07/12 17:01, Osemeka Osuagwu wrote:
lcm = reduce(lambda x, y: x*y, templist) #my first lambda
expression! (multiply all
-1; format=flowed
Osemeka Osuagwu wrote:
Hi,
I started learning Python recently, having only very little programming
experience. I installed Pygame and tried using
How did you install it?
What operating system are you using?
import pygame
to test the installation and got the following
Hi,
I started learning Python recently, having only very little programming
experience. I installed Pygame and tried using
import pygame
to test the installation and got the following error in return;
Traceback (most recent call last):
File stdin, line 1, in module
ImportError: No module
11 matches
Mail list logo