On Sun, Apr 17, 2011 at 7:38 PM, candide <candide@free.invalid> wrote: > I could't imagine a builtin function having a so trivial implementation.
As it was pointed out, its not function, its type, SETBUILTIN("bool", &PyBool_Type); While its __new__ is indeed trivial (in essence, it just calls PyObject_IsTrue), it also provides needed comparison ops, repr and other magic methods for the type. You can check Objects/boolobject.c in python repository if its implementation is interesting for you. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list