2016-12-13 | Paul Boddie | file changeset files shortlog | Added encoding attributes and text encoding/decoding support to file streams. Added a test of Unicode object creation and output. |
paul@326 | 1 | import operator |
paul@326 | 2 | |
paul@326 | 3 | class C: |
paul@326 | 4 | pass |
paul@326 | 5 | |
paul@326 | 6 | c = C() |
paul@326 | 7 | print c.__name__ # __main__.C |
paul@326 | 8 | print C.__name__ # __main__.C |
paul@326 | 9 | |
paul@326 | 10 | # If it were defined, operator.__name__ would be __builtins__.core.module. |
paul@326 | 11 | |
paul@326 | 12 | print operator.__mname__ |
paul@326 | 13 | |
paul@326 | 14 | # If it were defined, operator.add.__name__ would be __builtins__.core.function. |
paul@326 | 15 | |
paul@326 | 16 | print operator.add.__fname__ |