What's up with the weird subthreads, Stephen?!
On Guido's suggestion, I'm working on posting those type-checking thoughts here.
-- Koos
On Sat, Sep 3, 2016 at 6:17 PM, Stephen J. Turnbull
wrote:
> Please respect Reply-To, set to python-ideas.
>
> Greg Ewing writes:
> > Chris Angelico wrote:
>
Please respect Reply-To, set to python-ideas.
Greg Ewing writes:
> Chris Angelico wrote:
> > Forcing people to write 1.0 just to be compatible with 1.5 will cause
> > a lot of annoyance.
>
> Indeed, this would be unacceptable IMO.
But "forcing" won't happen. Just ignore the warning. *All*
Chris Angelico wrote:
Forcing people to write 1.0 just to be compatible with 1.5 will cause
a lot of annoyance.
Indeed, this would be unacceptable IMO.
The checker could have a type 'smallint' that it
considers promotable to float. But that wouldn't
avoid the problem entirely, because e.g. add
On Fri, Sep 2, 2016, at 18:49, Koos Zevenhoven wrote:
> Then again, (b) instead of that being working code, it might be an
> error and spam only takes float. No problem, the type checker will
> catch that.
There are very few functions that should only take float and not int.
> On Fri, Sep 2, 2016
Won't you ll agree that this thread belongs on python-ideas?
--
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/op
On Sat, Sep 3, 2016 at 8:49 AM, Koos Zevenhoven wrote:
> On Fri, Sep 2, 2016 at 9:04 PM, Steven D'Aprano wrote:
>> On Fri, Sep 02, 2016 at 08:10:24PM +0300, Koos Zevenhoven wrote:
>>
>>> A good checker should be able to infer that x is a union type at the
>>> point that it's passed to spam, even
On Fri, Sep 2, 2016 at 9:04 PM, Steven D'Aprano wrote:
> On Fri, Sep 02, 2016 at 08:10:24PM +0300, Koos Zevenhoven wrote:
>
>> A good checker should be able to infer that x is a union type at the
>> point that it's passed to spam, even without the type annotation. For
>> example:
>>
>> def eggs(co