Function error

2014-06-14 Thread sandhyaranimangipudi
I am new to python, pls help me to resolve the below error >>> def fib(n): ... """Print a Fibonacci series up to n.""" File "", line 2 """Print a Fibonacci series up to n.""" ^ IndentationError: expected an indented block -- https://mail.python.org

Re: Function error

2014-06-14 Thread John Ladasky
On Saturday, June 14, 2014 11:17:50 AM UTC-7, sandhyaran...@gmail.com wrote: > I am new to python, pls help me to resolve the below error > > > > > > >>> def fib(n): > > ... """Print a Fibonacci series up to n.""" > > File "", line 2 > > """Print a Fibonacci series up to n.""" > >

Re: Function error

2014-06-14 Thread Terry Reedy
On 6/14/2014 2:17 PM, sandhyaranimangip...@gmail.com wrote: I am new to python, pls help me to resolve the below error Please read the nice tutorial, though no necessarily all at once. It explains things like this. def fib(n): ... """Print a Fibonacci series up to n.""" File "", line 2

Re: tempfile.py", line 83, in once_lock = _allocate_lock() thread.error: can't allocat lock

2014-06-14 Thread Cameron Simpson
On 14Jun2014 10:47, SABARWAL, SHAL wrote: Thanks for responding on this. This is with python version 2.7 . Hi, Please respond to the list, not just to me. And please respond below the quoted text (and trim the quote for relevance). It makes things much easier for everyone to follow the disc

Re: parsley parsing question, how to make a variable grammar

2014-06-14 Thread Michael Torrie
On 06/13/2014 03:05 PM, Eric S. Johansson wrote: > I appreciate any insight before I go too far off track. > --- eric Perhaps this is off-topic, and doesn't answer your question, but is Parsley a natural language parsing tool? If not, and if it is natural language that you're trying to parse, may

Re: OT: This Swift thing

2014-06-14 Thread Joshua Landau
On 12 June 2014 03:08, Steven D'Aprano wrote: > We know *much more* about generating energy from E = mc^2 than we know > about optimally flipping bits: our nuclear reactions convert something of > the order of 0.1% of their fuel to energy, that is, to get a certain > yield, we "merely" have to sup

Python's numeric tower

2014-06-14 Thread Steven D'Aprano
Does anyone know any examples of values or types from the standard library or well-known third-party libraries which satisfies isinstance(a, numbers.Number) but not isinstance(a, numbers.Complex)? -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinf

Re: OT: This Swift thing

2014-06-14 Thread Steven D'Aprano
On Sun, 15 Jun 2014 02:51:49 +0100, Joshua Landau wrote: > On 12 June 2014 03:08, Steven D'Aprano > wrote: >> We know *much more* about generating energy from E = mc^2 than we know >> about optimally flipping bits: our nuclear reactions convert something >> of the order of 0.1% of their fuel to e