<filename>user_defined.py
# /usr/bin/env python3
# _*_ coding:utf-8 _*_


class Chain(object):
    def __init__(self,path=""):
        self._path=path
    def __getattr__(self,path):
        return Chain('%s/%s'%(self._path,path))
    def __call__(self,path):
        return Chain('%s/%s'%(self._path,path))
    def __str__(self):
        return self._path
    __repr__=__str__
<filename>user_defined.py
# /usr/bin/env python3
# _*_ coding:utf-8 _*_


class Chain(object):
    def __init__(self,path=""):
        self._path=path
    def __getattr__(self,path):
        return Chain('%s/%s'%(self._path,path))
    def __call__(self,path):
        return Chain('%s/%s'%(self._path,path))
    def __str__(self):
        return self._path
    __repr__=__str__
# /usr/bin/env python3 # _*_ coding:utf-8 _*_