[ python-Feature Requests-1757395 ] splice() function for itertools

2007-07-20 Thread SourceForge.net
Feature Requests item #1757395, was opened at 2007-07-20 10:12
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1757395&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alexander Dutton (asdutton)
Assigned to: Nobody/Anonymous (nobody)
Summary: splice() function for itertools

Initial Comment:
Could we have a splice function in itertools? I see there was once a roundrobin 
proposal (#756253), but it was three years ago ...

Here's an alternate implementation:

def splice(*args):
  """splice(*iterables) --> iterator
  Returns an iterator whose next() method returns an element from each of the 
iterables in turn before starting again with the first iterable."""
  iters = list(args)
  n = len(iters)
  i = 0
  while n>0:
i %= n
try:
  yield iters[i].next()
  i += 1
except StopIteration, e:
  n -= 1
  iters[i:i+1] = []
  raise StopIteration

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1757395&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Feature Requests-1721083 ] Add File - Reload

2007-07-20 Thread SourceForge.net
Feature Requests item #1721083, was opened at 2007-05-18 05:15
Message generated for change (Comment added) made by taleinat
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1721083&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Raymond Hettinger (rhettinger)
Assigned to: Kurt B. Kaiser (kbk)
Summary: Add File - Reload

Initial Comment:
When using CVS or SVN, it is common to revert or merge a file that is open in 
the editor.  It would be great to have a reload/refresh option on the menu to 
bring in the changed file.  Without that option, the only approach is to close 
without saving, fire-up the editor again, and reload the file manually.

--

Comment By: Tal Einat (taleinat)
Date: 2007-07-21 02:29

Message:
Logged In: YES 
user_id=1330769
Originator: NO

I agree with KBK that what you suggest goes against IDLE's philosophy,
which is to be simple and uncluttered, avoiding "bells and whistles".

However, I do think that a simple "revert file" menu item in the File
menu, which would just reload the file from the file system, could be
generally useful.

Additionally, IDLE could monitor the file on the file system, and if it is
changed outside of IDLE, ask the user whether to continue with the current
version or switch to the new version on disk. I've seen some text editors
do this, and it can save some headaches. Drawbacks are that some users may
find this annoying (at least at first), and it could be somewhat complex to
implement. Thoughts on this? Perhaps this should be brought up on
IDLE-dev?

Each of the above would allow you to revert/merge using whatever
CVS/SVN/etc. tools you normally use, then just load the new version inside
the already open instance of IDLE. I think this would be a good separation
of roles between IDLE and version control tools.

--

Comment By: Kurt B. Kaiser (kbk)
Date: 2007-05-23 02:18

Message:
Logged In: YES 
user_id=149084
Originator: NO

But isn't this an example of a bell/whistle which is outside IDLE's design
policies?  It would add a menu item which would be rather rarely used,
especially by beginners, it seems to me.  Why not just close the edit
window (not IDLE) and re-open using the Files / Recent Files feature?

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1721083&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Feature Requests-1757831 ] Allow opening just an editor window

2007-07-20 Thread SourceForge.net
Feature Requests item #1757831, was opened at 2007-07-21 01:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1757831&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Tal Einat (taleinat)
Assigned to: Nobody/Anonymous (nobody)
Summary: Allow opening just an editor window

Initial Comment:
Currently, if IDLE is configured to open a shell window by default, there is no 
way to override this from the command line. There should be a way to just open 
an editor window from the command line.

Perhaps this should be the behavior when the -e option is  given? The shell 
could still be opened (if IDLE is so configured) for just "idle.py ", 
without the -e.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1757831&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com