Python is one of the coolest languages.
I was just playing around with it today, beginning a little program I'm writing for fun. Problem was that I'd like to be able to easily call functions based on some condition. "Easily" is the operative term.
And it *is* easy. Define the functions, place their names in a named list, and then call the list item as a function of condition. Here's a simple example:
Now that is neat. PHP does that, or something similar, you can call variables as a function just by adding () after them - I did it by accident.
|All times are GMT -4. The time now is 11:46 AM.|
Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.