Re: [Python-Dev] typing.py doesn't export Pattern and Match; is that intentional

2016-10-18 Thread Guido van Rossum
Yes, that's intentional. (We have a separate tracker for this module, https://github.com/python/typing/issues) On Tue, Oct 18, 2016 at 11:08 AM, Ryan Gonzalez wrote: > E.g.: > > > import typing > print(typing.Pattern, typing.Match) # Works. > from typing import * >

[Python-Dev] typing.py doesn't export Pattern and Match; is that intentional

2016-10-18 Thread Ryan Gonzalez
E.g.: import typing print(typing.Pattern, typing.Match) # Works. from typing import * print(Pattern, Match) # NameError: name 'Pattern' is not defined A quick look shows that typing.py doesn't have Pattern and Match in __all__. Was this intentional, or just an oversight? -- Ryan [ERROR]:

Re: [Python-Dev] O(1) deletes from the front of bytearray (was: Re: Adding bytes.frombuffer() constructor to PEP 467 (was: [Python-ideas] Adding bytes.frombuffer() constructor)

2016-10-18 Thread Chris Angelico
On Wed, Oct 19, 2016 at 2:57 AM, Chris Barker - NOAA Federal wrote: >> The proposal is that it should be documented as being part of the >> language spec starting in 3.4 (or whatever). > > Is the performance characteristics of any object part of the language spec? > > I.e

Re: [Python-Dev] O(1) deletes from the front of bytearray (was: Re: Adding bytes.frombuffer() constructor to PEP 467 (was: [Python-ideas] Adding bytes.frombuffer() constructor)

2016-10-18 Thread Chris Barker - NOAA Federal
> The proposal is that it should be documented as being part of the > language spec starting in 3.4 (or whatever). Is the performance characteristics of any object part of the language spec? I.e if someone wrote an implementation with an O(n) insert dict, it would suck, but wouldn't it still be

Re: [Python-Dev] Adding bytes.frombuffer() constructor to PEP 467 (was: [Python-ideas] Adding bytes.frombuffer() constructor

2016-10-18 Thread Chris Barker - NOAA Federal
>> >> >> Method proliferation on builtins is a Big Deal(TM) > > I wanted to quantify this concept, so here's a quick metric that helps > convey how every time we add a new builtin method we're immediately > making Python harder to comprehend: > def get_builtin_types(): >... import