2 Jun
2004
2 Jun
'04
9:58 p.m.
David A. Riggs wrote at 2004-6-1 18:40 -0400:
... but why on earth can't I ask for an object's type?
Because, in many cases the result would surprise you... "type" applied to almost any Zope object will not give you "Instance" (as you would expect in a pure Python application) but "ImplicitAcquirer Wrapper" (or something like this). Moreover, access to any object returned by type would give you an "Unauthorized" (as these objects do not carry the necessary security declarations). As a consequence, "type" would be (practically) unusable, even when you could call it. Use "same_type" instead. -- Dieter