[Ironpython-users] IronPython, Daily Digest 4/11/2012

no_reply at codeplex.com no_reply at codeplex.com
Thu Apr 12 12:58:17 CEST 2012


Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally
2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally
3. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally

----------------------------------------------

ISSUES

1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally
http://ironpython.codeplex.com/workitem/32530
User rumzeus has commented on the issue:

"Thanks for all the insights.

> For your test, I presume you tried accessing the same variable repeatedly in a loop?
Well, I timed my actual use case where various different variables are accessed in multiple scopes. Usually 2-6 variables get tested (on average twice per variable) per scope. Just one variable was tested  more than 10 times in the same scope. (The same variables names are used in the different scopes, though I doubt that this matters for caching.)

> I don't really see a clean way to optimize it since _storage on Scope is dynamic and has several possible concrete implementations in Microsoft.Scripting.
So this is unlikely to get changed?"-----------------

2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally
http://ironpython.codeplex.com/workitem/32530
User jdhardy has commented on the issue:

"My only possible concern with replacing CV with GV+C has to do with dynamic member lists, as you would get with an object implementing __getattr__ or (especially) missing_member. A dynamic object might not be able to return it's complete member list (possibly because it's infinite) yet still respond to GetMember correctly. Attempting to access it and then catching an exception is the only way to be sure.

A try-except block is also essentially how CPython's hasattr is implemented, so it's not completely crazy. :)"-----------------

3. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally
http://ironpython.codeplex.com/workitem/32530
User jdhardy has commented on the issue:

"Hmm, somehow I missed that this was about ScriptScope, not dynamic objects in general. As Keith said, Scopes can be backed by any dynamic object, but I don't think that's the common case. However, looking at the code (line 4027 in ./IronPython/Runtime/PythonContext.cs) it optimizes for the fast path already.

Can you provide a self-contained example that reproduces the issue?"
----------------------------------------------



----------------------------------------------
You are receiving this email because you subscribed to notifications on CodePlex.

To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20120412/ae708271/attachment.html>


More information about the Ironpython-users mailing list