Python程序语法和as3程序语法不一样的地方

1.python的变量不需要声明,直接用
2.python函数默认带值参数必须放在参数列表的最后面,参数可以无序
3.python的list拷贝要用切片方式,list等价as3的字符串数组[],元组等价于as3的不可变数组,用小括号,字典等价于object
4.list索引功能比as3多了负数索引,就是从数组尾部开始索引;list的切片功能等同as3数组的slice函数功能
5.字符串函数功能不太一样,startwith,in等,查找对象键值是否存在等,不过as3也可以实现,函数名不一样而已
6.Python里面有个Tuple 是不可变 list
7.未完待续

发表评论?

1 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>