Quantcast
Channel: Passing function returns as method parameters in Python - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by Pierre Monico for Passing function returns as method parameters in...

Sorry for digging up this topic, but after an interesting answer from a user on another topic, I thought I'll improve the answer to this question. Actually, you can assign a function with arguments to...

View Article



Answer by abarnert for Passing function returns as method parameters in Python

You can always combine two lists or two tuples into one just with +:can.coords(oval1, *(moveLeft() + addThirty(moveLeft())))Even if you've got sequences (or even iterators) of different types, you can...

View Article

Answer by Viktor Kerkez for Passing function returns as method parameters in...

If both functions return the same type (list or tuple) then just do:can.coords(oval1, *(moveLeft() + addThirty(moveLeft())))If they return different types (tuple, list, iterator, whatever) do:args =...

View Article

Passing function returns as method parameters in Python

I'm currently writing a small code to move two balls around in a Tkinter GUI and do some other stuff too. I've already written a code that works, but as it uses a lot of global variables I tried to...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images