Tagged Questions
22
votes
4answers
9k views
Why store a function inside a python dictionary?
I'm a python beginner, and I just learned a technique involving dictionaries and functions. The syntax is easy and it seems like a trivial thing, but my python senses are tingling. Something tells me ...
3
votes
5answers
425 views
Confusion regarding def function within Python
I've been learning Python for about 2 months now (Started with Learn Python The Hard Way, now reading Dive Into Python), and within both books, I still seem to be confused over this one bit of code.
...
0
votes
1answer
135 views
Using functions as statements on Python
A great feature of Javascript is function statements. You can do this:
(function myFunc(){
doSomething();
doSomethingElse();
})();
Which is a way to declare a function and call it without ...
2
votes
2answers
661 views
What is Module Object and Function Object?
I am currently teaching myself Python, using the GNU licensed book "Introduction to Computer Science using Python."
In chapter 3, functions are covered. While I understand the concept of functions ...