paip.python3 的类使用跟python2 的不同之处

paip.python3 的类使用跟python2 的不同之处


#------python3的写法而且使用..
#class syllable(BaseClassA, BaseClassB):
class syllable():
    i = 123 # 类成员
    ##todox selft.xxx is err,tips selef is not def
    consonant=""
    vowel=""
    csnt=""
   # vowel=""
    
  # x=new sylll() is err .not support new programm..  
x=   syllable()
x.vowel="tt"
print(x.vowel)

python2.x 好像要需要self了,,,3.x不需要.要是有还错误..

作者 老哇的爪子 Attilax 艾龙,  EMAIL:1466519819@qq.com
转载请注明来源: http://blog.csdn.net/attilax

#----java php的都要new 了..python的不要...
原文地址:https://www.cnblogs.com/attilax/p/5964003.html