Hi ironpython,

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

In today's digest:ISSUES

1. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
2. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
3. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
4. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
5. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
6. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
7. [New comment] How to direct print output to the Console in a windows 
standalone?

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

ISSUES

1. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
http://ironpython.codeplex.com/workitem/35682
User paweljasinski has commented on the issue:

"<p>this is consistent with what I get out of pylint runs.<br>Another question. 
I assume you are using generators. Can you take a look at your code base and 
tell me what features of generators do you use.<br>We are looking for all 
places where `yield` comes up.</p><p>Do you use `yield` inside `try`?<br>Do you 
use `yield` inside `except`?<br>Do you use expression returned by 
`yield`?<br>Any other particular features of generators out of 
PEP342?</p><p>Thanks in advance</p><p><br></p>"-----------------

2. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
http://ironpython.codeplex.com/workitem/35682
User jdhardy has commented on the issue:

"<p>One option that might help is to use `-X:ShowClrExceptions 
-X:ExceptionDetail` if you're using ipy.exe. If you're hosting you can set them 
as engine options. That might at least give you the CLR stack trace.</p><p>It's 
odd that nothing in the test suite triggers it, but I know we don't have 100% 
coverage.</p>"-----------------

3. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
http://ironpython.codeplex.com/workitem/35682
User paweljasinski has commented on the issue:

"<p>I think, there is a workaround. Each of your generators must be deleted at 
the end of its scope.<br></p>"-----------------

4. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
http://ironpython.codeplex.com/workitem/35682
User paweljasinski has commented on the issue:

"<p>This is caused by generator finalizer, run in the finalizer thread to call 
indirectly MoveNext.<br>This happens only if to generator did not hit the end 
of generator function and didn't get explicit 
close/delete.<br></p>"-----------------

5. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
http://ironpython.codeplex.com/workitem/35682
User paweljasinski has commented on the issue:

"<p>here is another generator cp, which hints at the problem: 
https://ironpython.codeplex.com/workitem/17255</p>"-----------------

6. [New comment] ValueError: Index was out of range. Must be non-negative and 
less than the size of the collection.
http://ironpython.codeplex.com/workitem/35682
User s3e3 has commented on the issue:

"<p>I have checked our codebase, and it seems that:</p><p>1. yield is never 
used inside try or except block<br>2. values returned by yield are used further 
in the code<br>3. features from PEP342 are not used</p><p>Here is one example 
of generator use in our code:</p><p>```<br>class 
IndexedSpecSequence(SpecSequence):</p><p>    def __init__(self, sequence):<br>  
      self._items = []<br>        self._index = {}<br>        for i in 
sequence:<br>            bisect.insort(self._items, i)<br>            
self._add_to_index(i)<br>```</p><p>Here, &quot;sequence&quot; argument in 
\__init__ is actually generator expression, e.g. 
(&quot;ComponentVersionsSequence is subclass of 
&quot;IndexedSpecSequence&quot;):</p><p>```<br>   def 
_denorm_component_versions(self, component_version_ids):<br>        return 
ComponentVersionsSequence(self._datastore.component_versions[i]<br>             
                               for i in 
component_version_ids)<br>```</p>"-----------------

7. [New comment] How to direct print output to the Console in a windows 
standalone?
http://ironpython.codeplex.com/workitem/35688
User johntrinder has commented on the issue:

"<p>With help from the community I figured out the solution. Basically 
sys.stdout (which the print statement uses) needs to be modified. I created an 
IP wrapper module around the DLL that exposes the Console window to a Windows 
app. It's as follows:</p><p>```<br>import clr<br>from System import 
Environment, EnvironmentVariableTarget</p><p>_mylib = 
Environment.GetEnvironmentVariable('IRONPYTHON_MYLIB', 
EnvironmentVariableTarget.User)<br>clr.AddReferenceToFileAndPath(_mylib + 
r&quot;\_CSASSEMBLIES\MyConsole.dll&quot;)</p><p>from System import 
Console<br>import sys<br>from MyConsole import ConsoleManager</p><p>class 
_proxy():<br>      def __init__(self):<br>         return</p><p>   def 
write(self, string):<br>            Console.Write(string)</p><p>sys.stdout = 
_proxy() #global - once set doesn't need resetting<br>```<br>Hope someone finds 
this useful on the odd occasion that it may be needed:)</p>"
----------------------------------------------



----------------------------------------------
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.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to