Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36712
| Date | 2013-01-12 18:01 +0000 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: async fuction |
| References | <6bcc6374-88bb-47a0-b2c3-8082794ed158@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.454.1358013700.2939.python-list@python.org> (permalink) |
On 2013-01-12 04:43, aleksey@silk.bz wrote: > Hello. > > Can someone help me to resolv error. > > code: > [snip] > > @Async > def fnc(pi, pp): > > print "fnc-" > i=pi > while ( i < 10000000 ) : > i=i+1 > print "fnc+" > pass > > @Async > def fnc1(pp): > print "fnc1-",pp > > > @Async > def fnc2(): > print "fnc2-" > i=0 > while ( i < 100000 ) : > i=i+1 > print "fnc2+" > pass > > fnc(i=0,pp="123123") > fnc1() > > > error: > > Exception in thread fnc1: > Traceback (most recent call last): > File "C:\Python27\lib\threading.py", line 551, in __bootstrap_inner > self.run() > File "C:\Python27\lib\threading.py", line 504, in run > self.__target(*self.__args, **self.__kwargs) > File "C:/Users/rootiks/YandexDisk/py/myftpbackup/asynclib.py", line 26, in run > self.Result = self.Callable(*args, **kwargs) > TypeError: fnc1() takes exactly 1 argument (0 given) > 1. You're calling function 'fnc' with keyword arguments 'i' and 'pp'; it's expecting 'pi' and 'pp'. 2. You're calling function 'fnc1' with no arguments; it's expecting one argument.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
async fuction aleksey@silk.bz - 2013-01-11 20:43 -0800 Re: async fuction Chris Angelico <rosuav@gmail.com> - 2013-01-12 15:52 +1100 Re: async fuction MRAB <python@mrabarnett.plus.com> - 2013-01-12 18:01 +0000
csiph-web