Re: python keyword question

OK, you are using Python 2.x, then try searching in your text editor for the string "function" and examine every occurrence. Does the string appear in an import statement or a from statement? Does it appear in a lambda statement? Can you post every occurrence or are there too many?

If the string only occurs in the stated code:
a = function(guess)

then this may be a mystery.  Does the code work?

Richard
----- Original Message ----- From: "Alex Hall" <mehgcap@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Friday, November 20, 2009 7:42 AM
Subject: Re: python keyword question


I am not sure of the version, but I think it is 2.x. I doubt it it is imported, though that is possible, but it is a stand-alone .py file with no other libs or anything with it.


Have a great day,
Alex
New email address: mehgcap@xxxxxxxxx
----- Original Message ----- From: "Richard Dinger" <rrdinger@xxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Friday, November 20, 2009 10:35
Subject: Re: python keyword question


Hi Alex,

I am unaware of any keyword "function" in Python, unless it is in version 3.x, which I have not yet tried.

Does your code use Python version 3?

Are you certain the definition of "function" is not introduced via an import statement?

Are you certain the definition of "function" is not introduced via a lambda statement?

Richard



----- Original Message ----- From: "Alex Hall" <mehgcap@xxxxxxxxx>
To: "Blind Programming List" <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, November 19, 2009 9:31 PM
Subject: python keyword question


Hi all,

I am trying to get some python into javascript, and the following line appears:
a=function(guess)

What is this "function" doing? It is never defined in a def, so it must be a keyword? Any ideas? Thanks!


Have a great day,
Alex
New email address: mehgcap@xxxxxxxxx
__________
View the list's information and change your settings at http://www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at http://www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at http://www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at http://www.freelists.org/list/programmingblind

Other related posts: