ABCs -> infix syntax for isinstance() ?
bdesth.quelquechose at free.quelquepart.fr
Fri Oct 3 20:42:01 CEST 2008
Boris Borcic a écrit :
> Given the ABC innovation, maybe an infix syntax for isinstance() would
> be good.
> Possibilities :
> - stealing "is" away from object identity. As a motivation, true use
> cases for testing object identity are rare;
"x is None" is a *very* common test. Using a _marker object as default
arg value when you want to accept None as a meaningfull value is pretty
common. Testing a class identity often happens when writing metaclasses.
More information about the Python-list