On Wed, Feb 10, 2016 at 10:01 AM, Phil Thompson
wrote:
> On 10 Feb 2016, at 5:52 pm, Guido van Rossum wrote:
[...]
> That should do it, thanks. A followup question...
>
> Is...
>
> def foo(bar: str = Optional[str])
>
> ...valid? In other words, bar can be omitted, but if specified must be a s
On 10 Feb 2016, at 5:52 pm, Guido van Rossum wrote:
>
> On Wed, Feb 10, 2016 at 1:11 AM, Phil Thompson
> wrote:
>> I understand now. The documentation, as it stands, is correct and consistent
>> but (to me) the meaning of Optional is completely counter-intuitive. What
>> you suggest with str =
On Wed, Feb 10, 2016 at 1:11 AM, Phil Thompson
wrote:
> I understand now. The documentation, as it stands, is correct and consistent
> but (to me) the meaning of Optional is completely counter-intuitive. What you
> suggest with str = ... is exactly what I need. Adding a section to the docs
> de
On 10 February 2016 at 06:54, Guido van Rossum wrote:
> [Just adding to Andrew's response]
>
> On Tue, Feb 9, 2016 at 9:58 AM, Andrew Barnert via Python-Dev
> wrote:
>> On Feb 9, 2016, at 03:44, Phil Thompson wrote:
>>>
>>> There are a number of things I'd like to express but cannot find a way t
> On 9 Feb 2016, at 11:48 pm, Guido van Rossum wrote:
>
> [Phil]
I found the documentation confusing regarding Optional. Intuitively it
seems to be the way to specify arguments with default values. However it
is explained in terms of (for example) Union[str, None] and I (intuiti
On 02/09/2016 03:48 PM, Guido van Rossum wrote:
> (Assuming you meant Option*al*.) There seems to be an utter confusion
> of the two uses of the term "optional" here. An "optional argument"
> (outside PEP 484) is one that has a default value. The "Optional[T]"
> notation in PEP 484 means "Union[T
[Phil]
>>> I found the documentation confusing regarding Optional. Intuitively it
>>> seems to be the way to specify arguments with default values. However it is
>>> explained in terms of (for example) Union[str, None] and I (intuitively but
>>> incorrectly) read that as meaning "a str or None"
On 9 Feb 2016, at 8:54 pm, Guido van Rossum wrote:
>
> [Just adding to Andrew's response]
>
> On Tue, Feb 9, 2016 at 9:58 AM, Andrew Barnert via Python-Dev
> wrote:
>> On Feb 9, 2016, at 03:44, Phil Thompson wrote:
>>>
>>> There are a number of things I'd like to express but cannot find a way
[Just adding to Andrew's response]
On Tue, Feb 9, 2016 at 9:58 AM, Andrew Barnert via Python-Dev
wrote:
> On Feb 9, 2016, at 03:44, Phil Thompson wrote:
>>
>> There are a number of things I'd like to express but cannot find a way to do
>> so...
>>
>> - objects that implement the buffer protocol
On Feb 9, 2016, at 03:44, Phil Thompson wrote:
>
> There are a number of things I'd like to express but cannot find a way to do
> so...
>
> - objects that implement the buffer protocol
That seems like it should be filed as a bug with the typing repo. Presumably
this is just an empty type that
I've been adding support to the SIP wrapper generator for automatically
generating PEP 484 compatible stub files so that future versions of PyQt can be
shipped with them. By way of feedback I thought I'd share my experience,
confusions and suggestions.
There are a number of things I'd like to e
11 matches
Mail list logo