首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > perl python >

请问执行顺序

2013-04-02 
请教执行顺序刚刚接触python,请教一个菜鸟的问题,下面:def split(pattern, string, maxsplit0, flags0):

请教执行顺序
刚刚接触python,请教一个菜鸟的问题,下面:

def split(pattern, string, maxsplit=0, flags=0):
    """Split the source string by the occurrences of the pattern,
    returning a list containing the resulting substrings."""
    return _compile(pattern, flags).split(string, maxsplit)

_compile 和split 的执行顺序是什么?先_compile还是split?

偶是做C的。
[解决办法]
应该是跟C++一样的,先执行compile生成一个对象,然后执行该对象的split方法
[解决办法]
从左向右

热点排行