2017-01-21 | Paul Boddie | raw annotate files changeset graph | Merged branches. |
1 import operator 2 3 class C: 4 pass 5 6 c = C() 7 print c.__name__ # C 8 print c.__mname__ # __main__ 9 print C.__name__ # C 10 print C.__mname__ # __main__ 11 12 # If it were defined, operator.__name__ would be module. 13 14 print operator.__mname__ # operator 15 16 # If it were defined, operator.add.__name__ would be function. 17 18 print operator.add.__fname__ # add 19 print operator.add.__mname__ # operator.binary