test_class.py
Go to the documentation of this file.
00001 
00002 
00003 class Myclass:
00004     def __init__(self, a):
00005         self.a = a
00006 
00007     @classmethod
00008     def class_method(cls, a_value):
00009         return Myclass(a_value)
00010 
00011 
00012 mc = Myclass.class_method(2)
00013 print mc.a


hai_sandbox
Author(s): Hai Nguyen
autogenerated on Wed Nov 27 2013 11:46:56