HI
The class Foo you have defined is local NameSpace for trial functioon, for
details http://docs.python.org/tutorial/classes.html
def trial():
class Foo(object):
def __init__(self):
print("Hello, world!")
lacalClass = Foo()
>>>trial
"Hello, world!"
Thanks
Jitendra
On Thu, Sep 29, 2011 at
Hi,
I am working one tool, which will do compile/run the workspace (that code
is written on c/c++). on that my requirment is i need to compile subfolder
also, i have wrote code for that also.
My problem is , i am unable to write the Unit test case for that. Since
my method (called run_subfolder)
Hi
I need to write the unit test cases for similary kind of sitution.
I need to write the unit test case for Foo.testCall. for both case true or
false. I am unalbe to do that.
kindly please help me on this. as function is not returning any thing. from
google i got mox is good for this case. but
hello
here is my code for sending the mail, using this code email is going
'CODE
''
import smtplib
from time import strftime
from email.mime.multipart
try any one 1)
>>>from __future__ import division
>>>2/3 -1/3
0.1
2)
>>>x = 2/3.0
>>>x - 1/3.0
0.1
On Mon, Mar 9, 2009 at 9:33 AM, Daniel Dalton wrote:
> Hi,
>
> On Mon, Mar 09, 2009 at 12:08:16AM +0100, Lo wrote:
> > I just tried python first time.
> >
> > 2/3
def foo(x = [0]):
x[0] = x[0] + 1
return x[0]
def soo(x = None):
if x is None:
x = [0]
x[0] = x[0] + 1
return x[0]
>>> foo()
1
>>>foo() #See the behavior incremented by one
2
>>>foo([1]) # but here based on given number
2
>>>foo()
3
>>>foo([1])
2
>>>foo()
4
>>>soo()
1
>>>soo()
1
>>>soo([1])
2
>