sufficiently pythonic code for testing type of function
A.T.Hofkamp
hat at se-126.se.wtb.tue.nl
Wed Oct 11 10:55:55 EDT 2006
More information about the Python-list mailing list
Wed Oct 11 10:55:55 EDT 2006
- Previous message (by thread): sufficiently pythonic code for testing type of function
- Next message (by thread): sufficiently pythonic code for testing type of function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2006-10-11, Bruno Desthuilliers <onurb at xiludom.gro> wrote: > > Now the real question : what if the object is not an instance of any of > the types, but still support the expected interface ? > one possible answer: Use ZopeInterfaces (and ask objects 'do you implement interface X' rather than 'are you type Y') Not sure what options you have when dealing with builtin data types however. Albert
- Previous message (by thread): sufficiently pythonic code for testing type of function
- Next message (by thread): sufficiently pythonic code for testing type of function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list