Re: easy question, how to double a variable

2009-12-28 Thread Tom Kermode
def twice(parameter = 2) return 4 2009/9/20 daggerdvm : >  Write the definition of a function  twice , that receives an  int > parameter and returns an  int that is twice the value of the > parameter. > > how can i do this > -- > http://mail.python.org/mailman/listinfo/python-list > -- http

Re: A Bug By Any Other Name ...

2009-07-18 Thread Tom Kermode
Maybe the IDE is the best place to warn you of something like that. You could have an IDE where you specify which language you're more familiar with and then have it display warnings likely to be relevant to you. People could collaborate to add support for gradually more niche languages. Python

Re: gett error message: "TypeError: 'int' object is not callable"

2009-07-09 Thread Tom Kermode
Hi, Do you know a good way to avoid running into this problem? It makes sense to suggest not calling variables the same names as built-in functions, but that's hard for a new python programmer who doesn't already know what all the built-in functions are. Over time a programmer will learn which

Re: can i write a assemly language programs in python

2009-07-09 Thread Tom Kermode
I wonder if the OP is trying to find out whether python programmes can be compiled and run as stand alone executables. (I know assembly and machine code are not the same, but it might be what they're after.) On windows you can use http://www.py2exe.org/ to bundle python programs into stand alone