1
0
mirror of https://github.com/gryf/pythonhelper.git synced 2025-12-18 12:00:27 +01:00
Files
pythonhelper/ftplugin/python/test_py_example.py
gryf c41a450990 Bugfix and move plugin to python specific ftplugin
Move to python specific plugin (ftplugin),
Fixed bug regarding empty buffer.
2016-05-25 08:27:36 +02:00

43 lines
760 B
Python

import os
class Foo(object):
"""Some doc"""
CLASS_ATTR = {"dict": 1,
"bla": "foobar"}
def __init__(self, arg):
"""initializaion"""
self.arg = arg
def method(self, x, y):
"""very important method"""
def inner_funtion(x, y):
for i in y:
x = x + i
result = y[:]
result.append(x)
return result
result = None
result2 = """\
multiline
string
the
annoying
bastard"""
if self.arg < 100:
result = inner_funtion(x, y)
return result if result else result2
def main():
instance = Foo(10)
print(os.path.curdir, instance.method(2, [1, 2, 3]))
if __name__ == "__main__":
main()