能力值:
( LV2,RANK:10 )
|
-
-
26 楼
666
|
能力值:
( LV7,RANK:110 )
|
-
-
27 楼
test
|
能力值:
( LV2,RANK:10 )
|
-
-
28 楼
test
|
能力值:
( LV2,RANK:10 )
|
-
-
29 楼
test .
|
能力值:
( LV2,RANK:10 )
|
-
-
30 楼
test
|
能力值:
( LV2,RANK:10 )
|
-
-
31 楼
第二栏可以隐藏么?
|
能力值:
( LV2,RANK:10 )
|
-
-
32 楼
test
|
能力值:
( LV2,RANK:10 )
|
-
-
33 楼
test
|
能力值:
( LV2,RANK:10 )
|
-
-
34 楼
#!/usr/bin/env python
#2015.4.17 23:02 P400 ch13.16.5 __metaclass__
from time import ctime
print('***Welcome to Metaclasses!')
print('\tMetaclass declaration first.')
class MetaC(type):
def __init__(cls,name,bases,attrd):
super(MetaC,cls).__init__(name, bases, attrd)
print('*** Created class %r at: %s ' %(name, ctime()))
print('\tClass "Foo" declaration next.')
class Foo(object, metaclass=MetaC):
def __init__(self):
print('*** Instantiated class %r at: %s' %(self.__class__.__name__, ctime()))
print('\tClass "Foo" instantiation next.')
f=Foo()
print('\tDONE')
'''
> /Users/waterdrop/Downloads/a.py(17)Foo()
15
16 class Foo(object, metaclass=MetaC):
---> 17 def __init__(self):
18 print('*** Instantiated class %r at: %s' %(self.__class__.__name__, ctime()))
19
ipdb> s
--Call--
> /Users/waterdrop/Downloads/a.py(10)__init__()
8
9 class MetaC(type):
---> 10 def __init__(cls,name,bases,attrd):
11 super(MetaC,cls).__init__(name, bases, attrd)
12 print('*** Created class %r at: %s ' %(name, ctime()))
ipdb> s
> /Users/waterdrop/Downloads/a.py(11)__init__()
9 class MetaC(type):
10 def __init__(cls,name,bases,attrd):
---> 11 super(MetaC,cls).__init__(name, bases, attrd)
12 print('*** Created class %r at: %s ' %(name, ctime()))
13
ipdb> s
> /Users/waterdrop/Downloads/a.py(12)__init__()
10 def __init__(cls,name,bases,attrd):
11 super(MetaC,cls).__init__(name, bases, attrd)
---> 12 print('*** Created class %r at: %s ' %(name, ctime()))
13
14 print('\tClass "Foo" declaration next.')
ipdb> p cls
<class '__main__.Foo'>
ipdb> p name
'Foo'
ipdb> p bases
(<class 'object'>,)
ipdb> p attrd
{'__module__': '__main__', '__qualname__': 'Foo', '__init__': <function Foo.__init__ at 0x104e1cf28>, '__return__': None}
''' Test
|
能力值:
( LV2,RANK:10 )
|
-
-
35 楼
ttestt
|
能力值:
( LV2,RANK:10 )
|
-
-
36 楼
ceshi
|
能力值:
( LV2,RANK:10 )
|
-
-
37 楼
test
|
能力值:
( LV2,RANK:10 )
|
-
-
38 楼
test
|
能力值:
( LV4,RANK:50 )
|
-
-
39 楼
test
|
能力值:
( LV2,RANK:10 )
|
-
-
40 楼
rset
|
能力值:
( LV2,RANK:10 )
|
-
-
41 楼
retest
|
能力值:
( LV2,RANK:10 )
|
-
-
42 楼
|
能力值:
( LV2,RANK:10 )
|
-
-
43 楼
love
|
能力值:
( LV2,RANK:10 )
|
-
-
46 楼
test
|
能力值:
( LV3,RANK:20 )
|
-
-
47 楼
test
|
能力值:
( LV4,RANK:50 )
|
-
-
48 楼
很强势
|
|
|