Re: [Python-ideas] PEP: Distributing a Subset of the Standard Library

2016-12-02 Thread Tomas Orsava
On 11/30/2016 03:56 AM, Nick Coghlan wrote: Really, I think the ideal solution from a distro perspective would be to enable something closer to what bash and other shells support for failed CLI calls: $ blender bash: blender: command not found... Install package 'blender' to provi

Re: [Python-ideas] Allow random.choice, random.sample to work on iterators

2016-12-02 Thread Terry Reedy
On 12/1/2016 3:19 AM, Sjoerd Job Postmus wrote: On Wed, Nov 30, 2016 at 02:32:54PM -0600, Nick Timkovich wrote: a generator with known length that's not indexable (a rare beast?). I don't believe a generator is ever indexable. Not as rare as you might think: k = set(range(10)) len(k) 10

Re: [Python-ideas] PEP: Distributing a Subset of the Standard Library

2016-12-02 Thread Nick Coghlan
On 3 December 2016 at 02:56, Tomas Orsava wrote: > Is there some reason not to use sys.excepthook for both interactive and > non-interactive use? From the docs: > > "When an exception is raised and uncaught, the interpreter calls > sys.excepthook with three arguments, the exception class, exceptio