Created
September 15, 2012 23:34
-
-
Save alejandrobernardis/3730351 to your computer and use it in GitHub Desktop.
por estas cosas amo a python!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class A(object): | |
| @staticmethod | |
| def sm(cls, p1=None, p2=None): | |
| print cls, p1, p2 | |
| @classmethod | |
| def cm(cls, p1=None, p2=None): | |
| print cls, p1, p2 | |
| class B(A): | |
| pass | |
| B.mm(B, 1, 2) | |
| B.cm(1, 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment