On 22:00, lunedì 02 giugno 2008 Paul Melis wrote:
> This doesn't exactly make sense, as what you want isn't really clear...
Sorry, I'm bad to express my toughts even I my nature language :)
I'll give a go to getattr() and see whether the results come in my taste :)
--
Mailsweeper Home : http://i
TheSaint wrote:
On 19:06, lunedì 02 giugno 2008 Chris wrote:
actions= ('print', 'sum', 'divide', 'myfunction')
parameters=(5, 'nothing',5.63, object)
8< 8<
getattr(...)
getattr(object, name[, default]) -> value
8< 8<
for nn in actions:
func = getattr(cp, nn)
if callable(func)
On 19:06, lunedì 02 giugno 2008 Chris wrote:
>> actions= ('print', 'sum', 'divide', 'myfunction')
>> parameters=(5, 'nothing',5.63, object)
8< 8<
> getattr(...)
> getattr(object, name[, default]) -> value
8< 8<
> for nn in actions:
> func = getattr(cp, nn)
> if callable(func):
>
TheSaint <[EMAIL PROTECTED]> wrote:
> actions= ('print', 'sum', 'divide', 'myfunction')
> parameters=(5, 'nothing',5.63, object)
>
> for routines in actions:
> routines(parameters)
>
> I'd like to note that actions are string or string expressions of the
> program functions or python itself
On Jun 2, 12:35 pm, TheSaint <[EMAIL PROTECTED]> wrote:
> Hi,
> I using eval for quite strange reason, as long as I don't know a different
> way to implement.
>
> An example:
>
> actions= ('print', 'sum', 'divide', 'myfunction')
> parameters=(5, 'nothing',5.63, object)
>
> for routines in actions:
Hi,
I using eval for quite strange reason, as long as I don't know a different
way to implement.
An example:
actions= ('print', 'sum', 'divide', 'myfunction')
parameters=(5, 'nothing',5.63, object)
for routines in actions:
routines(parameters)
I'd like to note that actions are string or st