homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author josh.r
Recipients BreamoreBoy, josh.r, nicolas_49
Date 2014年07月04日.01:08:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1404436089.49.0.292746803232.issue13946@psf.upfronthosting.co.za>
In-reply-to
Content
I agree the design requiring it to pass the same information over and over is a bit odd (I've occasionally had cause to "borrow" some of ipython's niftyness for a plain Python terminal, and making custom completers work is one of the more awkward parts of the whole process). I'm guessing this is a product of conforming overzealously to the C API for readline functions like rl_filename_completion_function (see: http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC47 ).
It doesn't seem possible to do this nicely; __next__() on a generic iterator won't accept arguments (and practically, one of these arguments is state, the other is just "get next"), and trying to catch a TypeError due to the wrong number of arguments or using a generator as a string so you switch modes is ugly. Either the existing interface spawns additional arguments (also ugly; boolean flags that completely change behavior are the last refuge of a scoundrel), or a new function is created (possibly deprecating the old one over time.
Any suggestions?
History
Date User Action Args
2014年07月04日 01:08:09josh.rsetrecipients: + josh.r, BreamoreBoy, nicolas_49
2014年07月04日 01:08:09josh.rsetmessageid: <1404436089.49.0.292746803232.issue13946@psf.upfronthosting.co.za>
2014年07月04日 01:08:09josh.rlinkissue13946 messages
2014年07月04日 01:08:08josh.rcreate

AltStyle によって変換されたページ (->オリジナル) /