Re: How to limit *length* of PrettyPrinter

2020-07-24 Thread Stavros Macrakis
dn, Thanks again. For background, I come from C and Lisp hacking (one of the MIT developers of Macsyma /Maxima ) and also play with R, though I haven't been a professional developer for many years. I know better th

Re: Iterators, iterables and special objects

2020-07-24 Thread dn via Python-list
On 25/07/2020 06:35, Random832 wrote: On Tue, Jul 21, 2020, at 15:54, Terry Reedy wrote: The transformers should be once-through iterators because they can be passed once-through interators. I suppose one could make them iterables and add an attribute 'pristine' set to True in __init__ and Fals

[SOLVED] Re: Installing Python 3.8.3 with tkinter

2020-07-24 Thread Klaus Jantzen
On 7/22/20 12:20 PM, Klaus Jantzen wrote: Hi, Trying to install Python 3.8.3 with tkinter I run configure with the following options ./configure --enable-optimizations --with-ssl-default-suites=openssl --with-openssl=/usr/local --enable-loadable-sqlite-extensions --with-pydebug --with-tcltk

Re: Iterators, iterables and special objects

2020-07-24 Thread Random832
On Fri, Jul 24, 2020, at 14:42, Chris Angelico wrote: > And then someone will ask why you can't subscript a map object if the > underlying object could be subscripted, etc, etc, etc. It's not meant > to be a transparent layer over the object; it's just an iterator - > basically equivalent to: > >

Re: Iterators, iterables and special objects

2020-07-24 Thread Random832
On Thu, Jul 23, 2020, at 05:14, Peter Slížik wrote: > > Works in what way? You can't use it in a 'for' loop if it doesn't > > define __iter__. > > > > class Iterable: > def __iter__(self): > return Iterator(...) > > class Iterator: > def __next__(self): > return > >

Re: Iterators, iterables and special objects

2020-07-24 Thread Chris Angelico
On Sat, Jul 25, 2020 at 4:37 AM Random832 wrote: > > On Tue, Jul 21, 2020, at 15:54, Terry Reedy wrote: > > The transformers should be once-through iterators because they can be > > passed once-through interators. I suppose one could make them iterables > > and add an attribute 'pristine' set to

Re: Iterators, iterables and special objects

2020-07-24 Thread Random832
On Tue, Jul 21, 2020, at 15:54, Terry Reedy wrote: > The transformers should be once-through iterators because they can be > passed once-through interators. I suppose one could make them iterables > and add an attribute 'pristine' set to True in __init__ and False in > __iter__, but why have 2

Re: Need to 'import gtk' on Ubuntu 20.04, what do I need?

2020-07-24 Thread Chris Green
Akkana Peck wrote: > Chris Green writes: > > I have recently upgraded my desktop system from ubuntu 19.10 to ubuntu > > 20.04. [ ... ] > > The error I am getting is:- > [ ... ] > > ImportError: No module named gtk > > > > So what do I need to install on my Ubuntu 20.04 system to provide the