Commit 6c448ca0 authored by Devaev Maxim's avatar Devaev Maxim

Remove own join() implementation

parent 1bde63d9
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
##### Private methods #####
def joinItems(separator, first, *others_list) :
for others_list_item in others_list :
if len(first) == 0 :
first = others_list_item
else :
first += separator + others_list_item
return first
##### Public methods ##### ##### Public methods #####
def joinPath(first, *others_list) : def joinPath(first, *others_list) :
return joinItems("/", first, *others_list) return "/".join((first,) + others_list)
def joinMethod(first, *others_list) : def joinMethod(first, *others_list) :
return joinItems(".", first, *others_list) return ".".join((first,) + others_list)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment