type name
あとlistとかdictとかをクラスのコンストラクタではなくファクトリ的な関数に捉えてる人がいそうって話もあったりする。
pythonはnewとか付かないのでそれが関数なのかクラスのコンストラクタなのかパッと見わからないからなー。
(小文字クラスを使うことで意図的そー思わせる話もあったり
逆に意外なものがクラスになってたりも。
Python はインスタンス生成と関数呼び出しの区別がつかないですからね。
% python Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print type(enumerate) <type 'type'> >>> print type(classmethod) <type 'type'> >>> import itertools >>> print type(itertools.chain) <type 'type'>