forked from ansible/metrics-utility
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import os,sys, time | ||
|
||
def foo(x, y): | ||
result = x + y | ||
if x > 10: | ||
print("x is greater than 10") | ||
else: | ||
print("x is less than or equal to 10") | ||
return result | ||
|
||
def bar(): | ||
print "This is a syntax error" | ||
for i in range(10) | ||
print(i) | ||
|
||
def unused_function(): | ||
pass | ||
|
||
def long_function_name_with_too_many_parameters(a, b, c, d, e, f, g, h, i, j, k, l, m): | ||
return a + b + c + d + e + f + g + h + i + j + k + l + m | ||
|
||
class ExampleClass: | ||
def __init__(self, value): | ||
self.value = value | ||
def get_value(self): | ||
return self.value | ||
def set_value(self, value): | ||
self.value = value | ||
|
||
foo(5, 7) | ||
bar() | ||
example = ExampleClass(10) | ||
print(example.get_value()) | ||
example.set_value(20) | ||
print(example.get_value()) |