예제 #1
0
def create_public_function(text):
    if mode == "python":
        newText = 'def %s(' % format_snake_case(text)
        Text("%(text)s").execute({"text": newText})
    elif mode == "gopher":
        newText = 'func %s(' % format_pascal_case(text)
        Text("%(text)s").execute({"text": newText})
예제 #2
0
def create_class(text):
    Text('class %s():\n    ' % format_pascal_case(text)).execute()
예제 #3
0
def create_class(text):
    if mode == "python":
        newText = 'class %s():\n    ' % format_pascal_case(text)
        Text("%(text)s").execute({"text": newText})
예제 #4
0
def create_class_function(text, text2):
    if mode == "gopher":
        newText = 'func (x *%s) %s(' % (format_pascal_case(text),
                                        format_pascal_case(text2))
        Text("%(text)s").execute({"text": newText})
예제 #5
0
def create_public_function(text):
    Text('func %s(' % format_pascal_case(text)).execute()