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
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.
Philipp
___
Zope3-dev mailing list
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
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-3100 suggest just
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
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
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:
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
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_base).
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* do this.
10 matches
Mail list logo