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 04:35 PM.|
Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.