Life is short, you need Python

Python - Class

  Defining a class in Python is simple. As with functions, there is no separate interface definition. Just define the class and start coding. A Python class starts with the reserved word class, followed by the class name. Technically, that's all that's required, since a class doesn't need to inherit from any other class.

  • The Simplest Python Class

 

 

 

class TestClass:
pass

 

 

posted @ 2010-08-30 17:30  runfox545  阅读(220)  评论(0编辑  收藏  举报
白月黑羽 Python教程 白月黑羽Python