Martin v. Löwis wrote: > switch(o) { > case And: > Py_INCREF(And_singleton); > return And_singleton; > case Or: > Py_INCREF(Or_singleton); > return Or_singleton;
Well, And_singleton and Or_singleton could be anything, including integers or interned strings. Creating a class and then a singleton instance for each one seems like overkill and unnecessary bloat to me. -- Greg _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com