[Python-checkins] r68919 - in python/branches/py3k: Doc/library/importlib.rstLib/importlib/NOTES Lib/importlib/_bootstrap.py

Antoine Pitrou solipsis at pitrou.net
Sun Jan 25 11:35:58 CET 2009


<brett.cannon> writes:
> +    Only class methods are defined by this class to alleviate the need for
> +    instantiation.

Why is it so? Is there some obvious performance improvement?
Instantiation and normal methods are generally a more intuitive coding style
than having only classmethods.
Also, it means you can have several instances with different parameters each,
and it eases testing (you can monkeypatch a test-specific instance without
disrupting the whole stuff).




More information about the Python-checkins mailing list