Re: [Python-Dev] PEP 561: Distributing and Packaging Type Information

2017-10-29 Thread Ethan Smith
On Fri, Oct 27, 2017 at 12:44 AM, Nathaniel Smith wrote: > On Thu, Oct 26, 2017 at 3:42 PM, Ethan Smith wrote: > > However, the stubs may be put in a sub-folder > > of the Python sources, with the same name the ``*.py`` files are in. For > > example, the ``flyingcircus`` package would have its s

Re: [Python-Dev] \G (match last position) regex operator non-existant in python?

2017-10-29 Thread Jakub Wilk
* Guido van Rossum , 2017-10-28, 14:05: even if we outright switched there would *still* be two versions, because regex itself has an internal versioning scheme where V0 claims to be strictly compatible with re and V1 explicitly changes the matching rules in some cases. (I don't know if this me

Re: [Python-Dev] The type of the result of the copy() method

2017-10-29 Thread Guido van Rossum
On Sun, Oct 29, 2017 at 10:41 AM, Raymond Hettinger < raymond.hettin...@gmail.com> wrote: > > > On Oct 29, 2017, at 10:04 AM, Guido van Rossum wrote: > > > > Without an answer to these questions I think it's better to admit defeat > and return a dict instance > > I think it is better to admit suc

Re: [Python-Dev] The type of the result of the copy() method

2017-10-29 Thread Raymond Hettinger
> On Oct 29, 2017, at 10:04 AM, Guido van Rossum wrote: > > Without an answer to these questions I think it's better to admit defeat and > return a dict instance I think it is better to admit success and recognize that these APIs have fared well in the wild. Focusing just on OrderedDict() a

Re: [Python-Dev] Migrate python-dev to Mailman 3?

2017-10-29 Thread Barry Warsaw
On Oct 29, 2017, at 11:42, Serhiy Storchaka wrote: > Does Mailman 3 provide a NNTP interface? The NNTP interface of Gmane still > works, but it can be switched off at any time. It would be more reliable to > not depend on an unstable third-party service. I use the NNTP interface of Gmane too (

Re: [Python-Dev] The type of the result of the copy() method

2017-10-29 Thread Guido van Rossum
It's somewhat problematic. If I subclass dict with a different constructor, but I don't overload copy(), how can the dict.copy() method construct a correct instance of the subclass? Even if the constructor signatures match, how can dict.copy() make sure it copies all attributes properly? Without an

Re: [Python-Dev] The type of the result of the copy() method

2017-10-29 Thread Raymond Hettinger
> On Oct 29, 2017, at 8:19 AM, Serhiy Storchaka wrote: > > The copy() methods of list, dict, bytearray, set, frozenset, > WeakValueDictionary, WeakKeyDictionary return an instance of the base type > containing the content of the original collection. > > The copy() methods of deque, defaultdic

Re: [Python-Dev] \G (match last position) regex operator non-existant in python?

2017-10-29 Thread MRAB
On 2017-10-29 12:27, Serhiy Storchaka wrote: 27.10.17 18:35, Guido van Rossum пише: The "why" question is not very interesting -- it probably wasn't in PCRE and nobody was familiar with it when we moved off PCRE (maybe it wasn't even in Perl at the time -- it was ~15 years ago). I didn't unde

Re: [Python-Dev] The type of the result of the copy() method

2017-10-29 Thread Brett Cannon
It probably should be more consistent and I have a vague recollection that this has been brought up before. On Sun, Oct 29, 2017, 08:21 Serhiy Storchaka, wrote: > The copy() methods of list, dict, bytearray, set, frozenset, > WeakValueDictionary, WeakKeyDictionary return an instance of the base

Re: [Python-Dev] Migrate python-dev to Mailman 3?

2017-10-29 Thread Serhiy Storchaka
26.10.17 12:24, Victor Stinner пише: We are using Mailman 3 for the new buildbot-status mailing list and it works well: https://mail.python.org/mm3/archives/list/buildbot-sta...@python.org/ I prefer to read archives with this UI, it's simpler to follow threads, and it's possible to reply on the

[Python-Dev] The type of the result of the copy() method

2017-10-29 Thread Serhiy Storchaka
The copy() methods of list, dict, bytearray, set, frozenset, WeakValueDictionary, WeakKeyDictionary return an instance of the base type containing the content of the original collection. The copy() methods of deque, defaultdict, OrderedDict, Counter, ChainMap, UserDict, UserList, WeakSet, Elem

Re: [Python-Dev] \G (match last position) regex operator non-existant in python?

2017-10-29 Thread Serhiy Storchaka
27.10.17 18:35, Guido van Rossum пише: The "why" question is not very interesting -- it probably wasn't in PCRE and nobody was familiar with it when we moved off PCRE (maybe it wasn't even in Perl at the time -- it was ~15 years ago). I didn't understand your description of \G so I googled it