On Nov 12, 2008, at 11:48 AM, [EMAIL PROTECTED] wrote:

It seems to me that what you are describing is exactly what abcs were
added for in 2.6, in particular registration:

class AnotherClass(metaclass=ABCMeta):
   pass
AnotherClass.register(basestring)

assert isinstance(str, AnotherClass)

Please read this first:
http://www.python.org/dev/peps/pep-3119/

and tell us why that would not work.

You're right, that is exactly the need I was looking to fill. Thanks for pointing it out!

Now I have only two regrets: first, that our shop is still using 2.5 and this functionality is new in 2.6; and second, that it does not appear to include an easy way to check the types of elements of a sequence or mapping.

Still, I can see that this is a very carefully considered PEP and is the best solution for the future, so I will study it carefully and incorporate it into our practices ASAP.

Thanks,
- Joe

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to