Re: [Python-Dev] Decision of having a deprecation period or not for changing csv.DictReader returning type.

2017-12-17 Thread 尚辉
Since regular dicts are ordered in 3.7, it might be cleaner to returning regular dict instead of OrderedDict? ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Usefulness of binary compatibility accross Python versions?

2017-12-17 Thread Random832
On Sat, Dec 16, 2017, at 08:22, Antoine Pitrou wrote: > Typically, when adding a tp_XXX slot, you also need to add a > Py_TPFLAGS_HAVE_XXX type flag to signal those static type structures > that have been compiled against a recent enough PyTypeObject > definition. This way, extensions compiled

Re: [Python-Dev] Usefulness of binary compatibility accross Python versions?

2017-12-17 Thread Nathaniel Smith
On Dec 16, 2017 11:44 AM, "Guido van Rossum" wrote: On Sat, Dec 16, 2017 at 11:14 AM, Antoine Pitrou wrote: > On Sat, 16 Dec 2017 19:37:54 +0100 > Antoine Pitrou wrote: > > > > Currently, you can pass a `module_api_version` to

Re: [Python-Dev] PEP 567 -- Context Variables

2017-12-17 Thread Yury Selivanov
Hi Ben, On Sun, Dec 17, 2017 at 10:38 AM, Ben Darnell wrote: > On Tue, Dec 12, 2017 at 12:34 PM Yury Selivanov > wrote: >> >> Hi, >> >> This is a new proposal to implement context storage in Python. >> >> It's a successor of PEP 550 and builds on

Re: [Python-Dev] Decision of having a deprecation period or not for changing csv.DictReader returning type.

2017-12-17 Thread Antoine Pitrou
On Mon, 18 Dec 2017 03:24:05 +0900 INADA Naoki wrote: > On Mon, Dec 18, 2017 at 12:46 AM, Guido van Rossum wrote: > > My gut suggests me not to do this (neither here nor in other similar cases). > > I doubt there's much of a performance benefit anyway.

Re: [Python-Dev] Decision of having a deprecation period or not for changing csv.DictReader returning type.

2017-12-17 Thread INADA Naoki
On Mon, Dec 18, 2017 at 12:46 AM, Guido van Rossum wrote: > My gut suggests me not to do this (neither here nor in other similar cases). > I doubt there's much of a performance benefit anyway. OrderedDict uses 2x memory than dict. So it affects memory usage of applications

Re: [Python-Dev] Is static typing still optional?

2017-12-17 Thread David Mertz
On Sun, Dec 17, 2017 at 8:22 AM, Guido van Rossum wrote: > On Sun, Dec 17, 2017 at 2:11 AM, Julien Salort wrote: > >> Naive question from a lurker: does it mean that it works also if one >> annotates with something that is not a type, e.g. a comment, >> >>

Re: [Python-Dev] PEP 567 -- Context Variables

2017-12-17 Thread Ben Darnell
On Tue, Dec 12, 2017 at 12:34 PM Yury Selivanov wrote: > Hi, > > This is a new proposal to implement context storage in Python. > > It's a successor of PEP 550 and builds on some of its API ideas and > datastructures. Contrary to PEP 550 though, this proposal only

Re: [Python-Dev] Is static typing still optional?

2017-12-17 Thread Guido van Rossum
On Sun, Dec 17, 2017 at 2:11 AM, Julien Salort wrote: > Le 15/12/2017 à 22:14, Paul Moore a écrit : > > Annotations and the annotation syntax are fundamental to the design. >> But that's core Python syntax. But I wouldn't describe types as being >> that significant to the

Re: [Python-Dev] Decision of having a deprecation period or not for changing csv.DictReader returning type.

2017-12-17 Thread Guido van Rossum
My gut suggests me not to do this (neither here nor in other similar cases). I doubt there's much of a performance benefit anyway. On Sat, Dec 16, 2017 at 10:04 PM, 尚辉 wrote: > Hi, guys > > In https://github.com/python/cpython/pull/4904, I made csv.DictReader > returning

Re: [Python-Dev] Is static typing still optional?

2017-12-17 Thread Julien Salort
Le 15/12/2017 à 22:14, Paul Moore a écrit : Annotations and the annotation syntax are fundamental to the design. But that's core Python syntax. But I wouldn't describe types as being that significant to the design, it's more "if you supply them we'll make use of them". Naive question from a

Re: [Python-Dev] Decision of having a deprecation period or not for changing csv.DictReader returning type.

2017-12-17 Thread Antoine Pitrou
On Sun, 17 Dec 2017 14:04:52 +0800 尚辉 wrote: > Hi, guys > > In https://github.com/python/cpython/pull/4904, I made csv.DictReader > returning regular dict instead of OrderedDict. But this code could break > existing code that relied on methods like move_to_end() which are