At 12:33 PM 4/20/2007 -0700, Talin wrote: >Additionally, the need to override the classification of an >object can be done more cleanly using generic functions: In the simplest >case, one can define a "category membership" generic function that >simply returns False in the base implementation, and then provide >overrides that return True for any classes of interest.
Yes, but that's sort of like saying it's better to point a pistol at your foot than a shotgun. :) Explicitly testing category membership is a bug, not a feature; you're far better off defining an overload to do whatever it was you were going to make the if-then test do. _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
