I am using pygame and i have three variables that i
want to sort (var1, var2 and var3) and be able to
refer to them later in a statement that will use them
in sorted order:
the statement i am using is:
objSprites = pygame.sprite.OrderedUpdates(var1,
var2, var3)
and i want var1, var2 and var3 t
If i input the following in python:
var1 = 7
var2 = 9
var3 = 5
args = [var1, var2, var3]
args.sort()
then if if type:
args
the output is
[5, 7, 9]
but i want the output to be
[var3, var1, var2]
is there a function that will output the variable
names in the order they
Thanks Kent, and Evert, and everyone,
I really appreciate the advice on etiqutte and all
your help. I will think through my questions much more
thoroughly before any further inquiries and will
'reply to all' as advised.
--- Kent Johnson <[EMAIL PROTECTED]> wrote:
> ted b wrote
I want class One to be able to access access class
Two's value property after its been updated. Everytime
I try (by running, say testTwo().value) I get the
__init__ value. The update method fro class Two is
called elsewhere in the program, and I want class
One's "getTwo" method to access class Two'
Is there a way i can select all elements from a list
that do not meet selection criteria. I want to be able
to select elements that have values of, say, < 1 but
only if at least one of the elements has a value of >
0.
What i mean is, for example, in the code below, if one
of the elements of "list
I am trying to figure out how to make a class instance
respond the same way as another class instance if the
other is affected by some event. I have been playing
around with inheritance, and have tried other stuff,
but i am somewhat of a newbie and I have been having
difficulty (but you guys, parti
Can you suggest a good way to iterate through the
remainder of list and update them?
Ex:
Thing1.value = 0
Thing2.value = 1
Thing3.value = 0
Thing4.value = 0
Things = [Thing1, Thing2, Thing3, Thing4]
I want to iterate through 'Things' and if
'Thing.value' > 0, then I want to set all values for
th