Dieter Maurer wrote:
Dmitry Vasiliev wrote at 2006-5-23 17:06 +0400:
...
PEP-3100 suggest "just call the object and catch the exception" instead of use
"callable()". So maybe we can write:
try:
ob()
except:
pass
return ob
Unfortunately exceptions still will be masked.
Yes, and ther
Dmitry Vasiliev wrote at 2006-5-23 17:06 +0400:
> ...
>PEP-3100 suggest "just call the object and catch the exception" instead of use
>"callable()". So maybe we can write:
>
>try:
> ob()
>except:
> pass
>return ob
>
>Unfortunately exceptions still will be masked.
Yes, and therefore *NEVER
Philipp von Weitershausen wrote at 2006-5-23 17:02 +0200:
> ...
>callable() isn't even deprecated yet, so if it solves our problem, we
>can use it IMO. Note that Zope 3 deliberately doesn't use it because of
>the proxy problem. Zope 2 works around that by stripping
>proxies/wrappers first (ob.aq_ba
Philipp von Weitershausen wrote:
(Which is, btw, why I prefer direct imports and dislike zapi
nowadays: it doesn't make clear what a particular API the function
comes from).
For that and other reasons: death to zapi!
--
Benji York
Senior Software Engineer
Zope Corporation
_
Dmitry Vasiliev wrote:
try:
ob()
except:
pass
Please god, no bare excepts!
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http:
Stephan Richter wrote:
> On Tuesday 23 May 2006 11:02, Philipp von Weitershausen wrote:
>> Would callable(removeAllProxies(obj)) be harmful in any way if you
>> end up calling the proxied obj() anyway?
>
> No, we do this for zapi.isinstance as well.
Well, yeah, zapi.isinstance really is from
zope
On Tuesday 23 May 2006 11:02, Philipp von Weitershausen wrote:
> Would callable(removeAllProxies(obj)) be harmful in any way if you
> end up calling the proxied obj() anyway?
No, we do this for zapi.isinstance as well.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Ph
Dmitry Vasiliev wrote:
> Philipp von Weitershausen wrote:
>> Hi there,
>>
>> I've filed an issue in the collector outlining a problem with old style
>> classes and TALES traversal: http://www.zope.org/Collectors/Zope3-dev/635
>>
>> In particular, I'm looking for comments on problem #2.
>
> PEP-310
Philipp von Weitershausen wrote:
Hi there,
I've filed an issue in the collector outlining a problem with old style
classes and TALES traversal: http://www.zope.org/Collectors/Zope3-dev/635
In particular, I'm looking for comments on problem #2.
PEP-3100 suggest "just call the object and catch