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
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
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
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