<html><head><style type="text/css" media="screen">Body{font-family: Verdana;font-size:.75em;}h4{font-size:.9em;}a{color: #3a62a6;}.digest .toc {margin-bottom: 15px; padding-bottom:8px; border-bottom: 1px solid #ccc;}.digest .tocItem {margin-bottom: 15px;}.tocItem a{color:#000;text-decoration: none;}.tocItem a:hover{color: #3a62a6;text-decoration: underline;}.topic{padding-bottom: 8px;margin-bottom: 20px; border-bottom: 1px solid #ccc;}.topicHeader{margin-bottom:10px;}.topicTitle{font-weight: bold;}.replies p{margin:0;padding:0;}.replies hr{width: 15%;text-align: left;margin: 0 auto 5px 0;border: none 0;border-top: 1px solid #ccc;height: 1px;}.reply{margin-bottom: 6px;padding-bottom: 4px;}.anchorMarker{color: #3a62a6;}.footer{color: gray;}</style></head><body><div class="digest"><p>Hi ironpython,</p><p>Here's your Daily Digest of new issues for project "<a href="http://ironpython.codeplex.com/">IronPython</a>".</p><p>In today's digest:</p><h4>ISSUES</h4><div class="toc"><div class="tocItem"><a href="#toc_issue_1">1. <span class="tocTitle">[New comment] compile() does not recognize CO_FUTURE_PRINT_FUNCTION</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_2">2. <span class="tocTitle">[New issue] Installing a beta removes stable installation</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_3">3. <span class="tocTitle">[New comment] Installing a beta removes stable installation</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_4">4. <span class="tocTitle">[New issue] ScriptSource.Execute returns null if expression is inside a condition</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_5">5. <span class="tocTitle">[New comment] ScriptSource.Execute returns null if expression is inside a condition</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_6">6. <span class="tocTitle">[Status update] ScriptSource.Execute returns null if expression is inside a condition</span> <span class="anchorMarker">↓</span></a></div></div><h4>ISSUES</h4><div class="topic"><a name="toc_issue_1"></a><div class="topicHeader"><span class="topicTitle">1. [New comment] compile() does not recognize CO_FUTURE_PRINT_FUNCTION</span> <a href="http://ironpython.codeplex.com/workitem/35354">view online</a></div><p>User jdhardy has commented on the issue:</p><p>"<p>Fixed in f064bdf.</p>"</p></div><div class="topic"><a name="toc_issue_2"></a><div class="topicHeader"><span class="topicTitle">2. [New issue] Installing a beta removes stable installation</span> <a href="http://ironpython.codeplex.com/workitem/35615">view online</a></div><p>User MarkusSchaber has proposed the issue:</p><p>"Even though I chose a different installation directory when installing IronPython 2.7.5b2, it did uninstall my stable 2.7.4 installation.<br />
<br />
This should be changed that several IronPython installations can reside on the same machine, as long as the user specifies different installation directories."</p></div><div class="topic"><a name="toc_issue_3"></a><div class="topicHeader"><span class="topicTitle">3. [New comment] Installing a beta removes stable installation</span> <a href="http://ironpython.codeplex.com/workitem/35615">view online</a></div><p>User MarkusSchaber has commented on the issue:</p><p>"<p>Discussion on the mailing list:<br>https://mail.python.org/pipermail/ironpython-users/2014-October/017263.html<br></p>"</p></div><div class="topic"><a name="toc_issue_4"></a><div class="topicHeader"><span class="topicTitle">4. [New issue] ScriptSource.Execute returns null if expression is inside a condition</span> <a href="http://ironpython.codeplex.com/workitem/35617">view online</a></div><p>User kbranch38 has proposed the issue:</p><p>"I'm trying to use IronPython as an expression evaluator by hosting it from .NET. After I discovered the SourceCodeKind.AutoDetect option, it works great when the final statement is on its own, like this:<br />
<pre><code>if True:
y = "True"
else:
y = "False"
y</code></pre>
ScriptSource.Execute will return "True" for the above, as expected. However, this code will return null:<br />
<pre><code>if True:
"True"
else:
"False"</code></pre>
This works as expected when entered into the IronPython interactive console, just not when run from the .NET hosting side. The same seems to be true any time the desired return value is inside another statement (a loop, function, etc.).<br />
<br />
Here's the hosting code (in VB.NET):<br />
<pre><code>Dim engine As ScriptEngine = Python.CreateEngine()
Dim scope As ScriptScope = engine.CreateScope()
Dim source As ScriptSource = engine.CreateScriptSourceFromString(str, SourceCodeKind.AutoDetect)
Dim result As Object = source.Execute(scope)</code></pre>
Is this a known limitation? Are there other options to achieve the same result? I'm trying to make things as simple for the user as possible - the alternatives I've found so far require a little more from them, like setting a specific variable or using 'return' with their value."</p></div><div class="topic"><a name="toc_issue_5"></a><div class="topicHeader"><span class="topicTitle">5. [New comment] ScriptSource.Execute returns null if expression is inside a condition</span> <a href="http://ironpython.codeplex.com/workitem/35617">view online</a></div><p>User jdhardy has commented on the issue:</p><p>"<p>It's a limitation of the Python language. In Ruby, if blocks are actually expressions and can have a return value like your example. In Python, they're statements and have no value. I'm afraid it can't be done in Python the way you want - the script writers will have to set a variable or use `return` or `yield`.</p>"</p></div><div class="topic"><a name="toc_issue_6"></a><div class="topicHeader"><span class="topicTitle">6. [Status update] ScriptSource.Execute returns null if expression is inside a condition</span> <a href="http://ironpython.codeplex.com/workitem/35617">view online</a></div><p>User jdhardy has updated the issue:</p><p>Status has changed from Proposed to Closed with the following comment, <br /><br />"If you have any further questions, please ask on StackOverflow or the mailing list (<a href="http://ironpython.net/support/" rel="nofollow">http://ironpython.net/support/</a>)."</p></div><div class="footer"><p>You are receiving this email because you subscribed to notifications on CodePlex.</p><p>To report a bug, request a feature, or add a comment, visit <a href="http://ironpython.codeplex.com/workitem/list/basic">IronPython Issue Tracker</a>. You can <a href="http://ironpython.codeplex.com/subscriptions/workitem/project/edit">unsubscribe or change your issue notification settings</a> on CodePlex.com.</p></div></div></body></html>