[PEAK] Permissions for class with __getitem__
Phillip J. Eby
pje at telecommunity.com
Mon Feb 14 08:39:35 EST 2005
At 01:46 PM 2/14/05 +0100, Radek Kanovsky wrote:
>I know it is minor problem but anyway 'x in y' expression is slightly
>ambiguous. Wouldn't be better to deprecate form 1 when we can now use
>unambiguous and more clear ``isinstance(subj, classobj)'' expression?
It doesn't seem to me that it would fix your problem, since it's form 2
that's causing a problem in your case.
I need to keep option 1 open though, because in future there will be other
things you can use on the right side of 'in'/'not in', in order to do
pattern matching.
So, maybe the fix would be to give form 1 priority over form 2, instead of
the other way around. I don't remember why I made the priorities that way
anyway, except that it seemed like it would be more backward-compatible
with normal "in" expressions that way.
More information about the PEAK
mailing list