Fredrik Lundh wrote:
> Tal Einat wrote:
>
> > This will work great if all of your functions recieve the same
> > argument(s).
>
> I assumed "every single function would be passing the same variables"
> meant exactly that, of course.
>
>
Right, as usual. I sort of missed that... ;)
- Tal
--
h
Tal Einat wrote:
> This will work great if all of your functions recieve the same
> argument(s).
I assumed "every single function would be passing the same variables"
meant exactly that, of course.
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> "unexpected" <[EMAIL PROTECTED]> wrote:
>
> > However, I'm passing in a few variables, so I can't just take it
> > out-though every single function would be passing the same variables.
> >
> > so something.func() is actually
> > something.func(string, list)
> >
> > How would
Try it and see. Functions are first-class citizens in Python.
On Aug 25, 2006, at 6:36 PM, unexpected wrote:
> I have a program where based on a specific value from a dictionary, I
> call a different function. Currently, I've implemented a bunch of
> if..elsif statements to do this, but it's gott
unexpected wrote:
> Currently, I've implemented a bunch of
> if..elsif statements to do this, but it's gotten to be over 30 right
> now and has gotten rather tedious. Is there a more efficient way to do
> this?
Use something other than Perl.
:)
Carl Banks
--
http://mail.python.org/mailman/lis
> Code:
>
> value = self.dictionary.get(keyword)[0]
>
> if value == "something":
> somethingClass.func()
> elsif value == "somethingElse":
> somethingElseClass.func()
> elsif value == "anotherthing":
> anotherthingClass.func()
> elsif value == "yetanotherthing":
> yetanotherthingCla
"unexpected" <[EMAIL PROTECTED]> wrote:
> However, I'm passing in a few variables, so I can't just take it
> out-though every single function would be passing the same variables.
>
> so something.func() is actually
> something.func(string, list)
>
> How would I modify it to include them?
just add
the missing () was the trick!
However, I'm passing in a few variables, so I can't just take it
out-though every single function would be passing the same variables.
so something.func() is actually
something.func(string, list)
How would I modify it to include them? Sorry I didn't include them the
unexpected wrote:
> I have a program where based on a specific value from a dictionary, I
> call a different function. Currently, I've implemented a bunch of
> if..elsif statements to do this, but it's gotten to be over 30 right
> now and has gotten rather tedious. Is there a more efficient way to
unexpected wrote:
> I have a program where based on a specific value from a dictionary, I
> call a different function. Currently, I've implemented a bunch of
> if..elsif statements to do this, but it's gotten to be over 30 right
> now and has gotten rather tedious. Is there a more efficient way to
"unexpected" <[EMAIL PROTECTED]> wrote:
> I have a program where based on a specific value from a dictionary, I
> call a different function. Currently, I've implemented a bunch of
> if..elsif statements to do this, but it's gotten to be over 30 right
> now and has gotten rather tedious. Is there a
I have a program where based on a specific value from a dictionary, I
call a different function. Currently, I've implemented a bunch of
if..elsif statements to do this, but it's gotten to be over 30 right
now and has gotten rather tedious. Is there a more efficient way to do
this?
Code:
value = s
12 matches
Mail list logo