Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36712

Re: async fuction

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'exception': 0.03; 'argument': 0.04; 'error:': 0.05; 'arguments': 0.07; '**kwargs)': 0.09; 'typeerror:': 0.09; 'def': 0.10; 'thread': 0.11; '10000000': 0.16; 'argument.': 0.16; 'arguments;': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'given)': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'wrote:': 0.17; 'skip:" 30': 0.20; 'error.': 0.21; 'pass': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '(most': 0.27; 'skip:" 50': 0.27; 'run': 0.28; '100000': 0.29; 'received:192.168.1.3': 0.29; 'skip:_ 10': 0.29; 'keyword': 0.30; 'function': 0.30; 'file': 0.32; 'received:84': 0.32; 'print': 0.32; 'traceback': 0.33; 'to:addr :python-list': 0.33; 'code:': 0.33; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'takes': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'help': 0.40; '26,': 0.65; 'header :Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; 'reply- to:addr:python.org': 0.84; 'self.run()': 0.84
X-CM-Score 0.00
X-CNFS-Analysis v=2.0 cv=HO4d4PRv c=1 sm=1 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=Tv4_tr9OjFAA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=kCMf76i88RAA:10 a=wFfRth3Cf5RxOQDkbsoA:9 a=wPNLvfGTeEIA:10 a=0nF1XD0wxitMEM03M9B4ZQ==:117
X-AUTH mrabarnett:2500
Date Sat, 12 Jan 2013 18:01:35 +0000
From MRAB <python@mrabarnett.plus.com>
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-Version 1.0
To python-list@python.org
Subject Re: async fuction
References <6bcc6374-88bb-47a0-b2c3-8082794ed158@googlegroups.com>
In-Reply-To <6bcc6374-88bb-47a0-b2c3-8082794ed158@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To python-list@python.org
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.454.1358013700.2939.python-list@python.org> (permalink)
Lines 55
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1358013700 news.xs4all.nl 6860 [2001:888:2000:d::a6]:49805
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:36712

Show key headers only | View raw


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 | NextPrevious in thread | Find similar | Unroll thread


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