zoukankan      html  css  js  c++  java
  • 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的不要...
  • 相关阅读:
    array_unshift() 、
    readfile() 函数
    Java的异常处理
    Java 接口
    Java 抽象类
    final关键字
    statice关键字
    dom查询
    JS 正则表达式
    JS对象
  • 原文地址:https://www.cnblogs.com/attilax/p/15199247.html
Copyright © 2011-2022 走看看