From bussonniermatthias at gmail.com  Wed Aug  2 14:44:57 2017
From: bussonniermatthias at gmail.com (Matthias Bussonnier)
Date: Wed, 2 Aug 2017 11:44:57 -0700
Subject: [IPython-dev] Incompatible change discussion: Pretty printing of
 ordered dict.
Message-ID: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>

Hi all,

As you may or may not be aware, with Python 3.6 the dictionary are
ordered by default. It is technically an implementation detail, though
some people would love for it not to.

Regardless, IPython has for a long time pretty-printed the dictionary
with _sorted_ keys, this thus prevent to teach python and show that
dictionaries maintain order. Thus there is the question of wether we
should disable sorting keys while pretty-printing.

https://github.com/ipython/ipython/issues/10110

This seem like a minor change, but I'd like to know if some of you are
_relying_ on the ordering of dict when they are printed, or have
compelling arguments against (or for) removing sorting of the keys
before pretty_printing.

If you care about the above subject, please have your voice heard in
above issue.

Thanks,
-- 
Matthias

From takowl at gmail.com  Wed Aug  2 16:32:34 2017
From: takowl at gmail.com (Thomas Kluyver)
Date: Wed, 2 Aug 2017 21:32:34 +0100
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
Message-ID: <CAOvn4qhiYtQX9-0++1PiBt+Rc1=Cs5Webzqqw3=WUFgiLtJW6w@mail.gmail.com>

I don't have a particular concrete use case, but as an experienced Python
programmer who knows that dicts are conceptually unordered, I like the
sorted presentation and would be sorry to lose it. It makes it easier to
quickly find something in a dict if its shown in alphabetical order.

If the dict maintaining insertion order becomes a language feature rather
than an implementation detail, I would favour showing that. But for now
it's an implementation detail, so it shouldn't change how we think about
dicts.

Thomas

On 2 August 2017 at 19:44, Matthias Bussonnier <bussonniermatthias at gmail.com
> wrote:

> Hi all,
>
> As you may or may not be aware, with Python 3.6 the dictionary are
> ordered by default. It is technically an implementation detail, though
> some people would love for it not to.
>
> Regardless, IPython has for a long time pretty-printed the dictionary
> with _sorted_ keys, this thus prevent to teach python and show that
> dictionaries maintain order. Thus there is the question of wether we
> should disable sorting keys while pretty-printing.
>
> https://github.com/ipython/ipython/issues/10110
>
> This seem like a minor change, but I'd like to know if some of you are
> _relying_ on the ordering of dict when they are printed, or have
> compelling arguments against (or for) removing sorting of the keys
> before pretty_printing.
>
> If you care about the above subject, please have your voice heard in
> above issue.
>
> Thanks,
> --
> Matthias
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org
> https://mail.python.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170802/d7a75e2b/attachment.html>

From dboonz at gmail.com  Wed Aug  2 17:24:54 2017
From: dboonz at gmail.com (Dirk Boonzajer Flaes)
Date: Wed, 2 Aug 2017 23:24:54 +0200
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <CAOvn4qhiYtQX9-0++1PiBt+Rc1=Cs5Webzqqw3=WUFgiLtJW6w@mail.gmail.com>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
 <CAOvn4qhiYtQX9-0++1PiBt+Rc1=Cs5Webzqqw3=WUFgiLtJW6w@mail.gmail.com>
Message-ID: <CAOtuR0Z61xWi8ninhGerszPVG01SAc8JrFUey0tZENTzBzC6tw@mail.gmail.com>

I am pretty experienced with numpy but I wasn't with using dicts, and this
'feature" confused me a lot! I would  be all for removing the sorting to
make it clear that the order is not preserved, although it does make
displaying dicts a bit less clear.

On Aug 2, 2017 10:33 PM, "Thomas Kluyver" <takowl at gmail.com> wrote:

> I don't have a particular concrete use case, but as an experienced Python
> programmer who knows that dicts are conceptually unordered, I like the
> sorted presentation and would be sorry to lose it. It makes it easier to
> quickly find something in a dict if its shown in alphabetical order.
>
> If the dict maintaining insertion order becomes a language feature rather
> than an implementation detail, I would favour showing that. But for now
> it's an implementation detail, so it shouldn't change how we think about
> dicts.
>
> Thomas
>
> On 2 August 2017 at 19:44, Matthias Bussonnier <
> bussonniermatthias at gmail.com> wrote:
>
>> Hi all,
>>
>> As you may or may not be aware, with Python 3.6 the dictionary are
>> ordered by default. It is technically an implementation detail, though
>> some people would love for it not to.
>>
>> Regardless, IPython has for a long time pretty-printed the dictionary
>> with _sorted_ keys, this thus prevent to teach python and show that
>> dictionaries maintain order. Thus there is the question of wether we
>> should disable sorting keys while pretty-printing.
>>
>> https://github.com/ipython/ipython/issues/10110
>>
>> This seem like a minor change, but I'd like to know if some of you are
>> _relying_ on the ordering of dict when they are printed, or have
>> compelling arguments against (or for) removing sorting of the keys
>> before pretty_printing.
>>
>> If you care about the above subject, please have your voice heard in
>> above issue.
>>
>> Thanks,
>> --
>> Matthias
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at python.org
>> https://mail.python.org/mailman/listinfo/ipython-dev
>>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org
> https://mail.python.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170802/4f9aee24/attachment.html>

From wes.turner at gmail.com  Wed Aug  2 17:29:55 2017
From: wes.turner at gmail.com (Wes Turner)
Date: Wed, 2 Aug 2017 16:29:55 -0500
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
Message-ID: <CACfEFw9aMEEvFLGaQcYG3Ehh25W9cMG6vCMMHGXcO8PuMNVp_g@mail.gmail.com>

Maybe a SORT_DICT_KEYS bool configuration setting? Really practically only
in order to teach:

- dict
  - https://docs.python.org/3/tutorial/datastructures.html#dictionaries
- PYTHONHASHSEED / -R
  - https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
  - https://docs.python.org/3/using/cmdline.html#cmdoption-R
- collections.OrderedDict (is backwards compatible)
  - https://docs.python.org/3/library/collections.html#ordereddict-objects



On Wednesday, August 2, 2017, Matthias Bussonnier <
bussonniermatthias at gmail.com> wrote:

> Hi all,
>
> As you may or may not be aware, with Python 3.6 the dictionary are
> ordered by default. It is technically an implementation detail, though
> some people would love for it not to.
>
> Regardless, IPython has for a long time pretty-printed the dictionary
> with _sorted_ keys, this thus prevent to teach python and show that
> dictionaries maintain order. Thus there is the question of wether we
> should disable sorting keys while pretty-printing.
>
> https://github.com/ipython/ipython/issues/10110
>
> This seem like a minor change, but I'd like to know if some of you are
> _relying_ on the ordering of dict when they are printed, or have
> compelling arguments against (or for) removing sorting of the keys
> before pretty_printing.
>
> If you care about the above subject, please have your voice heard in
> above issue.
>
> Thanks,
> --
> Matthias
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org <javascript:;>
> https://mail.python.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170802/4c3f62ed/attachment-0001.html>

From carl.input at gmail.com  Thu Aug  3 12:38:39 2017
From: carl.input at gmail.com (Carl Smith)
Date: Thu, 03 Aug 2017 16:38:39 +0000
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <CACfEFw9aMEEvFLGaQcYG3Ehh25W9cMG6vCMMHGXcO8PuMNVp_g@mail.gmail.com>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
 <CACfEFw9aMEEvFLGaQcYG3Ehh25W9cMG6vCMMHGXcO8PuMNVp_g@mail.gmail.com>
Message-ID: <CAP-uhDc-vcnaigkiATAiRhHBZmzHqYtCeZEZmtLezxnwg7KN3Q@mail.gmail.com>

I'm with Thomas.

On Wed, 2 Aug 2017 22:30 Wes Turner, <wes.turner at gmail.com> wrote:

> Maybe a SORT_DICT_KEYS bool configuration setting? Really practically only
> in order to teach:
>
> - dict
>   - https://docs.python.org/3/tutorial/datastructures.html#dictionaries
> - PYTHONHASHSEED / -R
>   - https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
>   - https://docs.python.org/3/using/cmdline.html#cmdoption-R
> - collections.OrderedDict (is backwards compatible)
>   - https://docs.python.org/3/library/collections.html#ordereddict-objects
>
>
>
> On Wednesday, August 2, 2017, Matthias Bussonnier <
> bussonniermatthias at gmail.com> wrote:
>
>> Hi all,
>>
>> As you may or may not be aware, with Python 3.6 the dictionary are
>> ordered by default. It is technically an implementation detail, though
>> some people would love for it not to.
>>
>> Regardless, IPython has for a long time pretty-printed the dictionary
>> with _sorted_ keys, this thus prevent to teach python and show that
>> dictionaries maintain order. Thus there is the question of wether we
>> should disable sorting keys while pretty-printing.
>>
>> https://github.com/ipython/ipython/issues/10110
>>
>> This seem like a minor change, but I'd like to know if some of you are
>> _relying_ on the ordering of dict when they are printed, or have
>> compelling arguments against (or for) removing sorting of the keys
>> before pretty_printing.
>>
>> If you care about the above subject, please have your voice heard in
>> above issue.
>>
>> Thanks,
>> --
>> Matthias
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at python.org
>> https://mail.python.org/mailman/listinfo/ipython-dev
>>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org
> https://mail.python.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170803/5b91c97c/attachment.html>

From benjaminrk at gmail.com  Fri Aug  4 10:10:04 2017
From: benjaminrk at gmail.com (MinRK)
Date: Fri, 4 Aug 2017 16:10:04 +0200
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <CAP-uhDc-vcnaigkiATAiRhHBZmzHqYtCeZEZmtLezxnwg7KN3Q@mail.gmail.com>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
 <CACfEFw9aMEEvFLGaQcYG3Ehh25W9cMG6vCMMHGXcO8PuMNVp_g@mail.gmail.com>
 <CAP-uhDc-vcnaigkiATAiRhHBZmzHqYtCeZEZmtLezxnwg7KN3Q@mail.gmail.com>
Message-ID: <CAHNn8BXp28iEn9AxzfckrYU=1x1=F2vOxbJdv4dj8-p9-YNfrQ@mail.gmail.com>

I'm pretty strongly in favor of keeping the sorting in our default
pretty-printing. It's extremely valuable for interacting with dictionaries
to have consistent, predictable display. There are plenty of ways to
illustrate dict ordering, such as by iterating through the dict , e.g.
`list(dict)`.

-Min

On Thu, Aug 3, 2017 at 6:38 PM, Carl Smith <carl.input at gmail.com> wrote:

> I'm with Thomas.
>
> On Wed, 2 Aug 2017 22:30 Wes Turner, <wes.turner at gmail.com> wrote:
>
>> Maybe a SORT_DICT_KEYS bool configuration setting? Really practically
>> only in order to teach:
>>
>> - dict
>>   - https://docs.python.org/3/tutorial/datastructures.html#dictionaries
>> - PYTHONHASHSEED / -R
>>   - https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
>>   - https://docs.python.org/3/using/cmdline.html#cmdoption-R
>> - collections.OrderedDict (is backwards compatible)
>>   - https://docs.python.org/3/library/collections.html#
>> ordereddict-objects
>>
>>
>>
>> On Wednesday, August 2, 2017, Matthias Bussonnier <
>> bussonniermatthias at gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> As you may or may not be aware, with Python 3.6 the dictionary are
>>> ordered by default. It is technically an implementation detail, though
>>> some people would love for it not to.
>>>
>>> Regardless, IPython has for a long time pretty-printed the dictionary
>>> with _sorted_ keys, this thus prevent to teach python and show that
>>> dictionaries maintain order. Thus there is the question of wether we
>>> should disable sorting keys while pretty-printing.
>>>
>>> https://github.com/ipython/ipython/issues/10110
>>>
>>> This seem like a minor change, but I'd like to know if some of you are
>>> _relying_ on the ordering of dict when they are printed, or have
>>> compelling arguments against (or for) removing sorting of the keys
>>> before pretty_printing.
>>>
>>> If you care about the above subject, please have your voice heard in
>>> above issue.
>>>
>>> Thanks,
>>> --
>>> Matthias
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev at python.org
>>> https://mail.python.org/mailman/listinfo/ipython-dev
>>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at python.org
>> https://mail.python.org/mailman/listinfo/ipython-dev
>>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org
> https://mail.python.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170804/de91e4bc/attachment.html>

From wes.turner at gmail.com  Fri Aug  4 10:36:12 2017
From: wes.turner at gmail.com (Wes Turner)
Date: Fri, 4 Aug 2017 09:36:12 -0500
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <CAHNn8BXp28iEn9AxzfckrYU=1x1=F2vOxbJdv4dj8-p9-YNfrQ@mail.gmail.com>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
 <CACfEFw9aMEEvFLGaQcYG3Ehh25W9cMG6vCMMHGXcO8PuMNVp_g@mail.gmail.com>
 <CAP-uhDc-vcnaigkiATAiRhHBZmzHqYtCeZEZmtLezxnwg7KN3Q@mail.gmail.com>
 <CAHNn8BXp28iEn9AxzfckrYU=1x1=F2vOxbJdv4dj8-p9-YNfrQ@mail.gmail.com>
Message-ID: <CACfEFw86tuNw=2ZdzB7_Y_wfUUG_3xwvMsARJfoS6hSaRoDTPQ@mail.gmail.com>

```python
repr(dict)

import pprint
pprint.pprint(dict)
print(pprint.pformat(dict)
```

On Friday, August 4, 2017, MinRK <benjaminrk at gmail.com> wrote:

> I'm pretty strongly in favor of keeping the sorting in our default
> pretty-printing. It's extremely valuable for interacting with dictionaries
> to have consistent, predictable display. There are plenty of ways to
> illustrate dict ordering, such as by iterating through the dict , e.g.
> `list(dict)`.
>
> -Min
>
> On Thu, Aug 3, 2017 at 6:38 PM, Carl Smith <carl.input at gmail.com
> <javascript:_e(%7B%7D,'cvml','carl.input at gmail.com');>> wrote:
>
>> I'm with Thomas.
>>
>> On Wed, 2 Aug 2017 22:30 Wes Turner, <wes.turner at gmail.com
>> <javascript:_e(%7B%7D,'cvml','wes.turner at gmail.com');>> wrote:
>>
>>> Maybe a SORT_DICT_KEYS bool configuration setting? Really practically
>>> only in order to teach:
>>>
>>> - dict
>>>   - https://docs.python.org/3/tutorial/datastructures.html#dictionaries
>>> - PYTHONHASHSEED / -R
>>>   - https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
>>>   - https://docs.python.org/3/using/cmdline.html#cmdoption-R
>>> - collections.OrderedDict (is backwards compatible)
>>>   - https://docs.python.org/3/library/collections.html#ordered
>>> dict-objects
>>>
>>>
>>>
>>> On Wednesday, August 2, 2017, Matthias Bussonnier <
>>> bussonniermatthias at gmail.com
>>> <javascript:_e(%7B%7D,'cvml','bussonniermatthias at gmail.com');>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> As you may or may not be aware, with Python 3.6 the dictionary are
>>>> ordered by default. It is technically an implementation detail, though
>>>> some people would love for it not to.
>>>>
>>>> Regardless, IPython has for a long time pretty-printed the dictionary
>>>> with _sorted_ keys, this thus prevent to teach python and show that
>>>> dictionaries maintain order. Thus there is the question of wether we
>>>> should disable sorting keys while pretty-printing.
>>>>
>>>> https://github.com/ipython/ipython/issues/10110
>>>>
>>>> This seem like a minor change, but I'd like to know if some of you are
>>>> _relying_ on the ordering of dict when they are printed, or have
>>>> compelling arguments against (or for) removing sorting of the keys
>>>> before pretty_printing.
>>>>
>>>> If you care about the above subject, please have your voice heard in
>>>> above issue.
>>>>
>>>> Thanks,
>>>> --
>>>> Matthias
>>>> _______________________________________________
>>>> IPython-dev mailing list
>>>> IPython-dev at python.org
>>>> https://mail.python.org/mailman/listinfo/ipython-dev
>>>>
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev at python.org
>>> <javascript:_e(%7B%7D,'cvml','IPython-dev at python.org');>
>>> https://mail.python.org/mailman/listinfo/ipython-dev
>>>
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at python.org
>> <javascript:_e(%7B%7D,'cvml','IPython-dev at python.org');>
>> https://mail.python.org/mailman/listinfo/ipython-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170804/55e72e63/attachment-0001.html>

From steve at holdenweb.com  Fri Aug  4 11:21:05 2017
From: steve at holdenweb.com (Steve Holden)
Date: Fri, 4 Aug 2017 16:21:05 +0100
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <CACfEFw86tuNw=2ZdzB7_Y_wfUUG_3xwvMsARJfoS6hSaRoDTPQ@mail.gmail.com>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
 <CACfEFw9aMEEvFLGaQcYG3Ehh25W9cMG6vCMMHGXcO8PuMNVp_g@mail.gmail.com>
 <CAP-uhDc-vcnaigkiATAiRhHBZmzHqYtCeZEZmtLezxnwg7KN3Q@mail.gmail.com>
 <CAHNn8BXp28iEn9AxzfckrYU=1x1=F2vOxbJdv4dj8-p9-YNfrQ@mail.gmail.com>
 <CACfEFw86tuNw=2ZdzB7_Y_wfUUG_3xwvMsARJfoS6hSaRoDTPQ@mail.gmail.com>
Message-ID: <9B401E24-E47E-4C4E-992B-E6AB9B5B7C0B@holdenweb.com>

It's always difficult to change a long-established behaviour. I'd prefer that dict  printing stayed as it is - I haven't seen many complaints so far, and as has been pointed out the key ordering is available if required.  S

Sent from my iPhone

> On 4 Aug 2017, at 15:36, Wes Turner <wes.turner at gmail.com> wrote:
> 
> ```python
> repr(dict)
> 
> import pprint
> pprint.pprint(dict)
> print(pprint.pformat(dict)
> ```
> 
>> On Friday, August 4, 2017, MinRK <benjaminrk at gmail.com> wrote:
>> I'm pretty strongly in favor of keeping the sorting in our default pretty-printing. It's extremely valuable for interacting with dictionaries to have consistent, predictable display. There are plenty of ways to illustrate dict ordering, such as by iterating through the dict , e.g. `list(dict)`.
>> 
>> -Min
>> 
>>> On Thu, Aug 3, 2017 at 6:38 PM, Carl Smith <carl.input at gmail.com> wrote:
>>> I'm with Thomas.
>>> 
>>> 
>>>> On Wed, 2 Aug 2017 22:30 Wes Turner, <wes.turner at gmail.com> wrote:
>>>> Maybe a SORT_DICT_KEYS bool configuration setting? Really practically only in order to teach:
>>>> 
>>>> - dict
>>>>   - https://docs.python.org/3/tutorial/datastructures.html#dictionaries
>>>> - PYTHONHASHSEED / -R
>>>>   - https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
>>>>   - https://docs.python.org/3/using/cmdline.html#cmdoption-R
>>>> - collections.OrderedDict (is backwards compatible)
>>>>   - https://docs.python.org/3/library/collections.html#ordereddict-objects
>>>> 
>>>> 
>>>> 
>>>>> On Wednesday, August 2, 2017, Matthias Bussonnier <bussonniermatthias at gmail.com> wrote:
>>>>> Hi all,
>>>>> 
>>>>> As you may or may not be aware, with Python 3.6 the dictionary are
>>>>> ordered by default. It is technically an implementation detail, though
>>>>> some people would love for it not to.
>>>>> 
>>>>> Regardless, IPython has for a long time pretty-printed the dictionary
>>>>> with _sorted_ keys, this thus prevent to teach python and show that
>>>>> dictionaries maintain order. Thus there is the question of wether we
>>>>> should disable sorting keys while pretty-printing.
>>>>> 
>>>>> https://github.com/ipython/ipython/issues/10110
>>>>> 
>>>>> This seem like a minor change, but I'd like to know if some of you are
>>>>> _relying_ on the ordering of dict when they are printed, or have
>>>>> compelling arguments against (or for) removing sorting of the keys
>>>>> before pretty_printing.
>>>>> 
>>>>> If you care about the above subject, please have your voice heard in
>>>>> above issue.
>>>>> 
>>>>> Thanks,
>>>>> --
>>>>> Matthias
>>>>> _______________________________________________
>>>>> IPython-dev mailing list
>>>>> IPython-dev at python.org
>>>>> https://mail.python.org/mailman/listinfo/ipython-dev
>>>> _______________________________________________
>>>> IPython-dev mailing list
>>>> IPython-dev at python.org
>>>> https://mail.python.org/mailman/listinfo/ipython-dev
>>> 
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev at python.org
>>> https://mail.python.org/mailman/listinfo/ipython-dev
>>> 
>> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org
> https://mail.python.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170804/07b463cc/attachment.html>

From yarkot1 at gmail.com  Fri Aug  4 14:23:17 2017
From: yarkot1 at gmail.com (Yarko Tymciurak)
Date: Fri, 4 Aug 2017 13:23:17 -0500
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <9B401E24-E47E-4C4E-992B-E6AB9B5B7C0B@holdenweb.com>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
 <CACfEFw9aMEEvFLGaQcYG3Ehh25W9cMG6vCMMHGXcO8PuMNVp_g@mail.gmail.com>
 <CAP-uhDc-vcnaigkiATAiRhHBZmzHqYtCeZEZmtLezxnwg7KN3Q@mail.gmail.com>
 <CAHNn8BXp28iEn9AxzfckrYU=1x1=F2vOxbJdv4dj8-p9-YNfrQ@mail.gmail.com>
 <CACfEFw86tuNw=2ZdzB7_Y_wfUUG_3xwvMsARJfoS6hSaRoDTPQ@mail.gmail.com>
 <9B401E24-E47E-4C4E-992B-E6AB9B5B7C0B@holdenweb.com>
Message-ID: <CAJ+Z=PLv8---9i7YE6ejaGoL2so3Y5vaWxcivyQj-eXM5yAidw@mail.gmail.com>

In [16]: d = {'c':3,'b':2,'a':1}

In [17]: d
Out[17]: {'a': 1, 'b': 2, 'c': 3}

In [18]: repr(d)
Out[18]: "{'c': 3, 'b': 2, 'a': 1}"

In [19]: import pprint

In [20]: pprint.pprint(d)
{'a': 1, 'b': 2, 'c': 3}

In [21]: print(d)
{'c': 3, 'b': 2, 'a': 1}

In [22]: print(pprint.pformat(d))
{'a': 1, 'b': 2, 'c': 3}


On Fri, Aug 4, 2017 at 10:21 AM, Steve Holden <steve at holdenweb.com> wrote:

> It's always difficult to change a long-established behaviour. I'd prefer
> that dict  printing stayed as it is - I haven't seen many complaints so
> far, and as has been pointed out the key ordering is available if required.
>  S
>
> Sent from my iPhone
>
> On 4 Aug 2017, at 15:36, Wes Turner <wes.turner at gmail.com> wrote:
>
> ```python
> repr(dict)
>
> import pprint
> pprint.pprint(dict)
> print(pprint.pformat(dict)
> ```
>
> On Friday, August 4, 2017, MinRK <benjaminrk at gmail.com> wrote:
>
>> I'm pretty strongly in favor of keeping the sorting in our default
>> pretty-printing. It's extremely valuable for interacting with dictionaries
>> to have consistent, predictable display. There are plenty of ways to
>> illustrate dict ordering, such as by iterating through the dict , e.g.
>> `list(dict)`.
>>
>> -Min
>>
>> On Thu, Aug 3, 2017 at 6:38 PM, Carl Smith <carl.input at gmail.com> wrote:
>>
>>> I'm with Thomas.
>>>
>>> On Wed, 2 Aug 2017 22:30 Wes Turner, <wes.turner at gmail.com> wrote:
>>>
>>>> Maybe a SORT_DICT_KEYS bool configuration setting? Really practically
>>>> only in order to teach:
>>>>
>>>> - dict
>>>>   - https://docs.python.org/3/tutorial/datastructures.html#dictionaries
>>>> - PYTHONHASHSEED / -R
>>>>   - https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
>>>>   - https://docs.python.org/3/using/cmdline.html#cmdoption-R
>>>> - collections.OrderedDict (is backwards compatible)
>>>>   - https://docs.python.org/3/library/collections.html#ordered
>>>> dict-objects
>>>>
>>>>
>>>>
>>>> On Wednesday, August 2, 2017, Matthias Bussonnier <
>>>> bussonniermatthias at gmail.com> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> As you may or may not be aware, with Python 3.6 the dictionary are
>>>>> ordered by default. It is technically an implementation detail, though
>>>>> some people would love for it not to.
>>>>>
>>>>> Regardless, IPython has for a long time pretty-printed the dictionary
>>>>> with _sorted_ keys, this thus prevent to teach python and show that
>>>>> dictionaries maintain order. Thus there is the question of wether we
>>>>> should disable sorting keys while pretty-printing.
>>>>>
>>>>> https://github.com/ipython/ipython/issues/10110
>>>>>
>>>>> This seem like a minor change, but I'd like to know if some of you are
>>>>> _relying_ on the ordering of dict when they are printed, or have
>>>>> compelling arguments against (or for) removing sorting of the keys
>>>>> before pretty_printing.
>>>>>
>>>>> If you care about the above subject, please have your voice heard in
>>>>> above issue.
>>>>>
>>>>> Thanks,
>>>>> --
>>>>> Matthias
>>>>> _______________________________________________
>>>>> IPython-dev mailing list
>>>>> IPython-dev at python.org
>>>>> https://mail.python.org/mailman/listinfo/ipython-dev
>>>>>
>>>> _______________________________________________
>>>> IPython-dev mailing list
>>>> IPython-dev at python.org
>>>> https://mail.python.org/mailman/listinfo/ipython-dev
>>>>
>>>
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev at python.org
>>> https://mail.python.org/mailman/listinfo/ipython-dev
>>>
>>>
>> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org
> https://mail.python.org/mailman/listinfo/ipython-dev
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org
> https://mail.python.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170804/30175813/attachment.html>

From pietro.terna at unito.it  Fri Aug  4 16:48:31 2017
From: pietro.terna at unito.it (Pietro Terna)
Date: Fri, 4 Aug 2017 22:48:31 +0200
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <CAJ+Z=PLv8---9i7YE6ejaGoL2so3Y5vaWxcivyQj-eXM5yAidw@mail.gmail.com>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
 <CACfEFw9aMEEvFLGaQcYG3Ehh25W9cMG6vCMMHGXcO8PuMNVp_g@mail.gmail.com>
 <CAP-uhDc-vcnaigkiATAiRhHBZmzHqYtCeZEZmtLezxnwg7KN3Q@mail.gmail.com>
 <CAHNn8BXp28iEn9AxzfckrYU=1x1=F2vOxbJdv4dj8-p9-YNfrQ@mail.gmail.com>
 <CACfEFw86tuNw=2ZdzB7_Y_wfUUG_3xwvMsARJfoS6hSaRoDTPQ@mail.gmail.com>
 <9B401E24-E47E-4C4E-992B-E6AB9B5B7C0B@holdenweb.com>
 <CAJ+Z=PLv8---9i7YE6ejaGoL2so3Y5vaWxcivyQj-eXM5yAidw@mail.gmail.com>
Message-ID: <f559c427-1dc8-1eaa-ecb8-0df1974f9b9d@unito.it>

     Dear all,

     just to understand ...

     Why in Idle the result is different?

Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
 >>> d = {'c':3,'b':2,'a':1}
 >>> d
{'c': 3, 'b': 2, 'a': 1}
 >>>

     Best, Pietro

Il 04/08/17 20:23, Yarko Tymciurak ha scritto:
> In [16]: d = {'c':3,'b':2,'a':1}
>
> In [17]: d
> Out[17]: {'a': 1, 'b': 2, 'c': 3}
>
> In [18]: repr(d)
> Out[18]: "{'c': 3, 'b': 2, 'a': 1}"
>
> In [19]: import pprint
>
> In [20]: pprint.pprint(d)
> {'a': 1, 'b': 2, 'c': 3}
>
> In [21]: print(d)
> {'c': 3, 'b': 2, 'a': 1}
>
> In [22]: print(pprint.pformat(d))
> {'a': 1, 'b': 2, 'c': 3}
>
>
> On Fri, Aug 4, 2017 at 10:21 AM, Steve Holden <steve at holdenweb.com 
> <mailto:steve at holdenweb.com>> wrote:
>
>     It's always difficult to change a long-established behaviour. I'd
>     prefer that dict  printing stayed as it is - I haven't seen many
>     complaints so far, and as has been pointed out the key ordering is
>     available if required.  S
>
>     Sent from my iPhone
>
>     On 4 Aug 2017, at 15:36, Wes Turner <wes.turner at gmail.com
>     <mailto:wes.turner at gmail.com>> wrote:
>
>>     ```python
>>     repr(dict)
>>
>>     import pprint
>>     pprint.pprint(dict)
>>     print(pprint.pformat(dict)
>>     ```
>>
>>     On Friday, August 4, 2017, MinRK <benjaminrk at gmail.com
>>     <mailto:benjaminrk at gmail.com>> wrote:
>>
>>         I'm pretty strongly in favor of keeping the sorting in our
>>         default pretty-printing. It's extremely valuable for
>>         interacting with dictionaries to have consistent, predictable
>>         display. There are plenty of ways to illustrate dict
>>         ordering, such as by iterating through the dict , e.g.
>>         `list(dict)`.
>>
>>         -Min
>>
>>         On Thu, Aug 3, 2017 at 6:38 PM, Carl Smith
>>         <carl.input at gmail.com> wrote:
>>
>>             I'm with Thomas.
>>
>>
>>             On Wed, 2 Aug 2017 22:30 Wes Turner,
>>             <wes.turner at gmail.com> wrote:
>>
>>                 Maybe a SORT_DICT_KEYS bool configuration setting?
>>                 Really practically only in order to teach:
>>
>>                 - dict
>>                   -
>>                 https://docs.python.org/3/tutorial/datastructures.html#dictionaries
>>                 <https://docs.python.org/3/tutorial/datastructures.html#dictionaries>
>>                 - PYTHONHASHSEED / -R
>>                 -
>>                 https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
>>                 <https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED>
>>                   -
>>                 https://docs.python.org/3/using/cmdline.html#cmdoption-R
>>                 <https://docs.python.org/3/using/cmdline.html#cmdoption-R>
>>                 - collections.OrderedDict (is backwards compatible)
>>                 -
>>                 https://docs.python.org/3/library/collections.html#ordereddict-objects
>>                 <https://docs.python.org/3/library/collections.html#ordereddict-objects>
>>
>>
>>
>>                 On Wednesday, August 2, 2017, Matthias Bussonnier
>>                 <bussonniermatthias at gmail.com> wrote:
>>
>>                     Hi all,
>>
>>                     As you may or may not be aware, with Python 3.6
>>                     the dictionary are
>>                     ordered by default. It is technically an
>>                     implementation detail, though
>>                     some people would love for it not to.
>>
>>                     Regardless, IPython has for a long time
>>                     pretty-printed the dictionary
>>                     with _sorted_ keys, this thus prevent to teach
>>                     python and show that
>>                     dictionaries maintain order. Thus there is the
>>                     question of wether we
>>                     should disable sorting keys while pretty-printing.
>>
>>                     https://github.com/ipython/ipython/issues/10110
>>                     <https://github.com/ipython/ipython/issues/10110>
>>
>>                     This seem like a minor change, but I'd like to
>>                     know if some of you are
>>                     _relying_ on the ordering of dict when they are
>>                     printed, or have
>>                     compelling arguments against (or for) removing
>>                     sorting of the keys
>>                     before pretty_printing.
>>
>>                     If you care about the above subject, please have
>>                     your voice heard in
>>                     above issue.
>>
>>                     Thanks,
>>                     --
>>                     Matthias
>>                     _______________________________________________
>>                     IPython-dev mailing list
>>                     IPython-dev at python.org
>>                     https://mail.python.org/mailman/listinfo/ipython-dev
>>                     <https://mail.python.org/mailman/listinfo/ipython-dev>
>>
>>                 _______________________________________________
>>                 IPython-dev mailing list
>>                 IPython-dev at python.org
>>                 https://mail.python.org/mailman/listinfo/ipython-dev
>>                 <https://mail.python.org/mailman/listinfo/ipython-dev>
>>
>>
>>             _______________________________________________
>>             IPython-dev mailing list
>>             IPython-dev at python.org
>>             https://mail.python.org/mailman/listinfo/ipython-dev
>>             <https://mail.python.org/mailman/listinfo/ipython-dev>
>>
>>
>>     _______________________________________________
>>     IPython-dev mailing list
>>     IPython-dev at python.org <mailto:IPython-dev at python.org>
>>     https://mail.python.org/mailman/listinfo/ipython-dev
>>     <https://mail.python.org/mailman/listinfo/ipython-dev>
>
>     _______________________________________________
>     IPython-dev mailing list
>     IPython-dev at python.org <mailto:IPython-dev at python.org>
>     https://mail.python.org/mailman/listinfo/ipython-dev
>     <https://mail.python.org/mailman/listinfo/ipython-dev>
>
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org
> https://mail.python.org/mailman/listinfo/ipython-dev

-- 
The world is full of interesting problems to be solved!

Home page: http://terna.to.it

Have a look to:
http://web-prod.santafe.edu/news-center/news/dangers-simplicity-complex-world

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170804/438ca771/attachment-0001.html>

From takowl at gmail.com  Fri Aug  4 16:51:36 2017
From: takowl at gmail.com (Thomas Kluyver)
Date: Fri, 4 Aug 2017 21:51:36 +0100
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <f559c427-1dc8-1eaa-ecb8-0df1974f9b9d@unito.it>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
 <CACfEFw9aMEEvFLGaQcYG3Ehh25W9cMG6vCMMHGXcO8PuMNVp_g@mail.gmail.com>
 <CAP-uhDc-vcnaigkiATAiRhHBZmzHqYtCeZEZmtLezxnwg7KN3Q@mail.gmail.com>
 <CAHNn8BXp28iEn9AxzfckrYU=1x1=F2vOxbJdv4dj8-p9-YNfrQ@mail.gmail.com>
 <CACfEFw86tuNw=2ZdzB7_Y_wfUUG_3xwvMsARJfoS6hSaRoDTPQ@mail.gmail.com>
 <9B401E24-E47E-4C4E-992B-E6AB9B5B7C0B@holdenweb.com>
 <CAJ+Z=PLv8---9i7YE6ejaGoL2so3Y5vaWxcivyQj-eXM5yAidw@mail.gmail.com>
 <f559c427-1dc8-1eaa-ecb8-0df1974f9b9d@unito.it>
Message-ID: <CAOvn4qjV-6rpa5yc1q+6OP+64ccVNoMJV1VLn_P-ZOn4oR8E1A@mail.gmail.com>

On 4 August 2017 at 21:48, Pietro Terna <pietro.terna at unito.it> wrote:

>     Why in Idle the result is different?
>
> Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04)
> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
> Type "copyright", "credits" or "license()" for more information.
> >>> d = {'c':3,'b':2,'a':1}
> >>> d
> {'c': 3, 'b': 2, 'a': 1}
>

IDLE displays the standard Python repr() of an object. Part of IPython is a
pretty-printing system that tries to provide clearer representations of
containers like dicts and lists.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170804/06fef77b/attachment.html>

From damianavila at gmail.com  Thu Aug 10 08:28:16 2017
From: damianavila at gmail.com (=?UTF-8?Q?Dami=C3=A1n_Avila?=)
Date: Thu, 10 Aug 2017 09:28:16 -0300
Subject: [IPython-dev] Incompatible change discussion: Pretty printing
 of ordered dict.
In-Reply-To: <CAOvn4qjV-6rpa5yc1q+6OP+64ccVNoMJV1VLn_P-ZOn4oR8E1A@mail.gmail.com>
References: <CANJQusWTx6FTWVJYFAx75-YYkB_VqbmZJ3cWt+M7GSqKD7tmmw@mail.gmail.com>
 <CACfEFw9aMEEvFLGaQcYG3Ehh25W9cMG6vCMMHGXcO8PuMNVp_g@mail.gmail.com>
 <CAP-uhDc-vcnaigkiATAiRhHBZmzHqYtCeZEZmtLezxnwg7KN3Q@mail.gmail.com>
 <CAHNn8BXp28iEn9AxzfckrYU=1x1=F2vOxbJdv4dj8-p9-YNfrQ@mail.gmail.com>
 <CACfEFw86tuNw=2ZdzB7_Y_wfUUG_3xwvMsARJfoS6hSaRoDTPQ@mail.gmail.com>
 <9B401E24-E47E-4C4E-992B-E6AB9B5B7C0B@holdenweb.com>
 <CAJ+Z=PLv8---9i7YE6ejaGoL2so3Y5vaWxcivyQj-eXM5yAidw@mail.gmail.com>
 <f559c427-1dc8-1eaa-ecb8-0df1974f9b9d@unito.it>
 <CAOvn4qjV-6rpa5yc1q+6OP+64ccVNoMJV1VLn_P-ZOn4oR8E1A@mail.gmail.com>
Message-ID: <CAH+mRR1hz5jJKupBt9wY1K8O+opOpOTs4Kx7Z4qskZU6AqoKDg@mail.gmail.com>

> If the dict maintaining insertion order becomes a language feature rather
than an implementation detail, I would favour showing that. But for now
it's an implementation detail, so it shouldn't change how we think about
dicts.

I agree.

2017-08-04 17:51 GMT-03:00 Thomas Kluyver <takowl at gmail.com>:

> On 4 August 2017 at 21:48, Pietro Terna <pietro.terna at unito.it> wrote:
>
>>     Why in Idle the result is different?
>>
>> Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04)
>> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
>> Type "copyright", "credits" or "license()" for more information.
>> >>> d = {'c':3,'b':2,'a':1}
>> >>> d
>> {'c': 3, 'b': 2, 'a': 1}
>>
>
> IDLE displays the standard Python repr() of an object. Part of IPython is
> a pretty-printing system that tries to provide clearer representations of
> containers like dicts and lists.
>
> Thomas
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org
> https://mail.python.org/mailman/listinfo/ipython-dev
>
>


-- 
*Dami?n Avila*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170810/f7eafac6/attachment.html>

From npropadovic at gmail.com  Tue Aug 22 08:36:55 2017
From: npropadovic at gmail.com (Propadovic Nenad)
Date: Tue, 22 Aug 2017 14:36:55 +0200
Subject: [IPython-dev] How can I enable file path autocompletion in the
 IPython console in PyCharm?
Message-ID: <CAD0yHOzQ_ggP2UHjD4KSQwBJ-q8jCqa6CFybPsD-OoFgxOYqDg@mail.gmail.com>

(I hope that sending variations of the same question to StacKOverflow,
Reddit and here is not considered spamming...)

Path autocompletion in the IPython console in PyCharm does not work well:

c:/U<TAB>

should autocomplete to:

cd c:/Users/

on my machine; instead, the best it manages is:

cd c:/UserWarning

which is plain wrong. IPython in the Anaconda prompt, however, behaves as
it should.

My strong assumption is that this is due to PyCharm not using the standard
IPython configuration files.

I'm aware of the console starting script ins PyCharm:

Settings->Build, Execution, Deployment->Console->Python console

and I've successfully used it to activate a simple magic command I've
written.

So here my question: is there a code configuration snippet that could be
inserted there, and that could just enable file path autocompletion? Or a
pointer to a general description on how IPython configuration files "work",
that would enable me to figure it out myself? That is, I imagine, the most
doable hack that would solve the problem for the time being.

Alternatively, any experiences with writing your own autocompletion using
the following libraries:

IPython.core.completer
IPython.core.completerlib

?

Is that doable? How much work can that be?

Thanks in advance!

Nenad

-----------------------------

Links supporting claims in the question(s) above:

1) Autocompletion in IPython console in PyCharm not working as it should

On StackOverflow there are three questions with similar wording, but not
one substantial answer:

https://stackoverflow.com/questions/32542289/pycharm-ipython-tab-completion-not-working-within-python-console
https://stackoverflow.com/questions/35612338/how-to-set-ipython-profile-in-pycharm
https://stackoverflow.com/questions/32458158/pycharm-python-console-autocompletion

(No, using Ctrl+Space instead of Tab does not solve anything.)

JetBrains (creators of PyCharm) know about this since, at least, two years:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/205820389-Console-tab-completion-

and seems to have started working on it, but never finished it. Discussion
states " this is only the initial step to getting full IPython tab
completions": https://youtrack.jetbrains.com/issue/PY-9345 . But the issue
is closed since October 2016:
https://github.com/JetBrains/intellij-community/pull/440

2) PyCharm not using ipython_config.py to configure IPython Console:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/206603035-Which-ipython-config-py-is-used-to-configure-IPython-for-Python-Console-

-----------------------------

My setup: PyCharm Community Edition 2017.2.1 Anaconda 2 (Python 2.7),
version 4.3.22 which contains IPython 5.1.0 on Windows 7 Professional N
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170822/8580d13e/attachment.html>