Re: [Python-ideas] Smoothing transition: 'unicode' and 'basestring' as aliases for 'str'?

2017-03-06 Thread Thomas Güttler
yes, you are right. It's better to leave Python3 clean (without "basestring"). I see two ways now. six six.string_types # replacement for basestring Source https://docs.djangoproject.com/en/1.10/topics/python3/#string-handling-with-six future -- from past.builtins im

Re: [Python-ideas] Smoothing transition: 'unicode' and 'basestring' as aliases for 'str'?

2017-03-06 Thread Mike Müller
Am 06.03.17 um 11:12 schrieb Thomas Güttler: > yes, you are right. It's better to leave Python3 clean (without "basestring"). > > I see two ways now. > > > six > > > six.string_types # replacement for basestring > > Source > https://docs.djangoproject.com/en/1.10/topics/python3/#

Re: [Python-ideas] Exploiting type-homogeneity in list.sort() (again!)

2017-03-06 Thread Terry Reedy
On 3/6/2017 1:56 AM, Elliot Gorokhovsky wrote: P.S. Is it OK if I close my current issue on the bug tracker and open a new issue, where I'll post the revised patch? The writing on my current issue uses the old, less-rigorous benchmarks, and I feel it would be less confusing if I just made a new

Re: [Python-ideas] Exploiting type-homogeneity in list.sort() (again!)

2017-03-06 Thread Chris Barker
On Sun, Mar 5, 2017 at 6:45 PM, Steven D'Aprano wrote: > I sometimes need to know if a list is homogenous, but unfortunately > checking large lists for a common type in pure Python is quote slow. > > Here is a radical thought... why don't lists track their common type > themselves? There's only a

Re: [Python-ideas] Exploiting type-homogeneity in list.sort() (again!)

2017-03-06 Thread Elliot Gorokhovsky
On Mon, Mar 6, 2017, 4:42 PM Jim J. Jewett wrote: (1) Good Job. Thanks! (3) Ideally, your graph would have the desired-to-be lines after the as-is lines; for English writing, that would mean putting your (short red) lines to the right of the (tall blue) lines. (4) I suspect colors other t