[Python-ideas] For CPython 3.1: make type Check and CheckExact macros consistent? universal?

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 25 04:51:39 CEST 2009

Zooko O'Whielacronx wrote:

> I like it the way it is -- "Check" means "any satisfactory type" and  
> "CheckExact" means "that type".  For types where only that type is  
> satisfactory, then their Check should be the same as CheckExact.

But not having a CheckExact for all types means if you
want an exact check you have to look up the API docs
for the type concerned, instead of just writing

More importantly, if the type is ever changed to be
subclassable, and its Check function updated accordingly,
existing calls to Check that were relying on an exact
check will become broken.


More information about the Python-ideas mailing list