On Sun, Sep 20, 2009 at 12:46 AM, Daniel Fetchinson
fetchin...@googlemail.com wrote:
Suppose I want to define a function that return the minimum number
that can be represented.
def f(x):
#body
That it, if I call f(10), f will return the minimum integer that can
be represented in the
On Sep 20, 1:15 pm, Peng Yu pengyu...@gmail.com wrote:
The problem is how to know what type of the argument and call the
corresponding function.
type(1)
type 'int'
type(1.2)
type 'float'
--
http://mail.python.org/mailman/listinfo/python-list
On 2009-09-20, Peng Yu pengyu...@gmail.com wrote:
Suppose I want to define a function that return the minimum number
that can be represented.
def f(x):
#body
That it, if I call f(10), f will return the minimum integer that can
be represented in the machine; if I cal f(10.5), f will
On Sun, Sep 20, 2009 at 9:37 AM, Grant Edwards inva...@invalid.invalid wrote:
On 2009-09-20, Peng Yu pengyu...@gmail.com wrote:
Suppose I want to define a function that return the minimum number
that can be represented.
def f(x):
#body
That it, if I call f(10), f will return the minimum
On 2009-09-20, Peng Yu pengyu...@gmail.com wrote:
You might also want to read up on the type() builtin
I want avoid using any 'if' statement.
Why?
In C++, I can use template.
If you want to write C++ code, then you should use a C++
compiler.
How to do not use 'if' statement in python?
Peng Yu wrote:
On Sun, Sep 20, 2009 at 9:37 AM, Grant Edwards inva...@invalid.invalid wrote:
On 2009-09-20, Peng Yu pengyu...@gmail.com wrote:
Suppose I want to define a function that return the minimum number
that can be represented.
def f(x):
#body
That it, if I call f(10), f
On Sep 20, 11:23 am, Peng Yu pengyu...@gmail.com wrote:
On Sun, Sep 20, 2009 at 9:37 AM, Grant Edwards inva...@invalid.invalid
wrote:
On 2009-09-20, Peng Yu pengyu...@gmail.com wrote:
Suppose I want to define a function that return the minimum number
that can be represented.
def f(x):
Hi,
Suppose I want to define a function that return the minimum number
that can be represented.
def f(x):
#body
That it, if I call f(10), f will return the minimum integer that can
be represented in the machine; if I cal f(10.5), f will return the
minimum float that can be represented in the
Suppose I want to define a function that return the minimum number
that can be represented.
def f(x):
#body
That it, if I call f(10), f will return the minimum integer that can
be represented in the machine; if I cal f(10.5), f will return the
minimum float that can be represented in