24 lines
406 B
Python
Executable file
24 lines
406 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
|
|
class TestClass( object ):
|
|
def __init__( self, value ):
|
|
self._var = value
|
|
self.DoSomething()
|
|
|
|
def DoSomething( self ):
|
|
for i in range( 0, 100 ):
|
|
if i < self._var:
|
|
print( '{0} is less than the value'.format( i ) )
|
|
else:
|
|
print( '{0} might be more'.format( i ) )
|
|
|
|
|
|
def Main():
|
|
t = TestClass( 18 )
|
|
|
|
t._var = 99
|
|
t.DoSomething()
|
|
|
|
|
|
Main()
|