[docs] some advice

2657068483 at qq.com 2657068483 at qq.com
Thu May 1 09:35:52 CEST 2014


1.Provide suport for class method/static method/instance method by using self and cls keywords
   Define class method by the first argument cls, cancel the @classmethod, like :  def classInfo(cls):pass
   Define instance method by the first argument self, like : def save(self):pass
   Define static method by none special argument, cancel the @staticmethod, like : def getInstance():pass
2.Cancel property statement, use a new keyword ppt to define properties, like :
   ppt Name():
         def get():
               pass
         def set(value):
              pass
        def del():
             pass
3.Use a new keyword base to replace the function super().


2657068483 at qq.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20140501/00bc0dab/attachment-0001.html>


More information about the docs mailing list