I need something like this:
def func1(*args, **kwargs):
if some_cond:
return func2(*args, **kwargs)
else:
return func3(some_other_args, **kwargs)
Thank you in advance, D. 13 1336
dmitrey <op*****@ukr.netwrote:
I need something like this:
def func1(*args, **kwargs):
if some_cond:
return func2(*args, **kwargs)
else:
return func3(some_other_args, **kwargs)
Thank you in advance, D.
You 'need something like this', so write something like that.
Did you intend to ask a question?
On Jul 1, 12:00 pm, Duncan Booth <duncan.bo...@invalid.invalidwrote:
You 'need something like this', so write something like that.
Did you intend to ask a question?
I would gladly write the one, but the example doesn't work, and I
don't know any easy way (moreover any way) to make it work correctly.
D.
dmitrey <op*****@ukr.netwrote:
On Jul 1, 12:00 pm, Duncan Booth <duncan.bo...@invalid.invalidwrote:
>You 'need something like this', so write something like that. Did you intend to ask a question?
I would gladly write the one, but the example doesn't work, and I
don't know any easy way (moreover any way) to make it work correctly.
D.
The example doesn't work because it isn't a real example (what are
some_cond or some_other_args?). An identical example which runs but doesn't
give the output you expect would be more meaningful.
If you actually wrote a runnable example, and explained what about it you
think doesn't work, then I could probably tell you how to fix it without
having to engage my telepathy.
The only thing I can see wrong with your made-up example is that you may
have intended a * before some_other_args, but since it isn't a real example
it is probably just a typo rather than being your question.
Thanks all, I have solved the problem.
D.
dmitrey ha escrito:
Thanks all, I have solved the problem.
D.
If you take the time to comment this, it is good form to comment on
how you solved the problem, so the next one wondering about it can
find an answer before posting.
--
Saludos
Adriano
dmitrey wrote:
Thanks all, I have solved the problem.
Why do people do this without posting what the actual solution is!!!!
Frank Swarbrick a écrit :
dmitrey wrote:
>Thanks all, I have solved the problem.
Why do people do this without posting what the actual solution is!!!!
Probably because those people think usenet is a free help desk ?
Bruno Desthuilliers skrev:
>Why do people do this without posting what the actual solution is!!!!
Probably because those people think usenet is a free help desk ?
Usenet definitely isn't a help desk. You often get useful answers from
usenet, from people who are not reading from a script.
Nis
Bruno Desthuilliers skrev:
>Why do people do this without posting what the actual solution is!!!!
Probably because those people think usenet is a free help desk ?
Usenet definitely isn't a help desk. You often get useful answers from
usenet, from people who are not reading from a script.
Nis
Bruno Desthuilliers skrev:
>Why do people do this without posting what the actual solution is!!!!
Probably because those people think usenet is a free help desk ?
Usenet definitely isn't a help desk. You often get useful answers from
usenet, from people who are not reading from a script.
Nis
Bruno Desthuilliers skrev:
>Why do people do this without posting what the actual solution is!!!!
Probably because those people think usenet is a free help desk ?
Usenet definitely isn't a help desk. You often get useful answers from
usenet, from people who are not reading from a script.
Nis
Frank Swarbrick <in*****@earthlink.netwrote:
>dmitrey wrote:
>Thanks all, I have solved the problem.
Why do people do this without posting what the actual solution is!!!!
Hey, if we're expected to magically deduce what the problem is
without being told an error messages, surely we can magically
deduce the discovered solution too?
--
\S -- si***@chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
"Frankly I have no feelings towards penguins one way or the other"
-- Arthur C. Clarke
her nu becomež se bera eadward ofdun hlęddre heafdes bęce bump bump bump
Sion Arrowsmith <si***@chiark.greenend.org.ukwrote:
Frank Swarbrick <in*****@earthlink.netwrote:
>>dmitrey wrote:
>>Thanks all, I have solved the problem.
Why do people do this without posting what the actual solution is!!!!
Hey, if we're expected to magically deduce what the problem is
without being told an error messages, surely we can magically
deduce the discovered solution too?
Quite so. Meanwhile the OP is killfiled so can't expect any help from me in
the future. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Achim Domma |
last post by:
Hi,
I'm using py2exe to create a exe out of a python script. If works fine so
far, but a get lot's of this warnings:
warning: use func(*args, **kwargs) instead of apply(func, args, kwargs)
...
|
by: Jim Jewett |
last post by:
Normally, I expect a subclass to act in a manner consistent
with its Base classes. In particular, I don't expect to
*lose* any functionality, unless that was the whole point of
the subclass. ...
|
by: Stefan Behnel |
last post by:
Hi!
I'm trying to do this in Py2.4b1:
-------------------------------
import logging
values = {'test':'bla'}
logging.log(logging.FATAL, 'Test is %(test)s', values)...
|
by: Tor Rustad |
last post by:
I have a C program, where I control the error behavior according to context:
/* some error handlers */
static void on_error_log (MYSQL *mysql, const char *msg, ...);
....
static void...
|
by: dmitrey |
last post by:
hi all,
howto check is object Arg1
- a func, lambda-func
- something else?
I tried callable(Arg1), but callable(lambda-func) returnes False
Thx, D.
|
by: dmitrey |
last post by:
hi all,
can anyone explain howto get function from module, known by string
names?
I.e. something like
def myfunc(module_string1, func_string2, *args):
eval('from ' + module_string1 + 'import...
|
by: JonathanB |
last post by:
Ok, this is probably definitely a newbie question, but I have looked
all over the Python library reference material and tutorials which I
can find online and I cannot find a clear definition of...
|
by: Sean DiZazzo |
last post by:
Why is the following not working? Is there any way to get keyword
arguments working with exposed XMLRPC functions?
~~~~~~~~~~~~~~~~ server.py
import SocketServer
from SimpleXMLRPCServer import...
|
by: dmitrey |
last post by:
hi all,
howto check is function capable of obtaining **kwargs?
i.e. I have some funcs like
def myfunc(a,b,c,...):...
some like
def myfunc(a,b,c,...,*args):...
some like
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |