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})
def create_class(text): Text('class %s():\n ' % format_pascal_case(text)).execute()
def create_class(text): if mode == "python": newText = 'class %s():\n ' % format_pascal_case(text) Text("%(text)s").execute({"text": newText})
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})
def create_public_function(text): Text('func %s(' % format_pascal_case(text)).execute()