[issue25797] Default argument values with type hints break type correctness

2015-12-04 Thread Emanuel Barry

Emanuel Barry added the comment:

As Stefan said, this is not a bug with Python. Enforcing strict type checking 
is the responsibility of third-party tools, not the interpreter.

--
nosy: +ebarry
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25797] Default argument values with type hints break type correctness

2015-12-04 Thread Stefan Krah

Stefan Krah added the comment:

The compiler does not perform type checking.  These are
type *annotations* for third party tools like Mypy.

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25797] Default argument values with type hints break type correctness

2015-12-04 Thread Dhruv Rajvanshi

New submission from Dhruv Rajvanshi:

Specifying default arguments break the type system. The types of default values 
aren't matched with the type of the argument.
Moreover, having None as a default value changes the type declaration to 
Optional[T]. So, the declaration may be 
f(a : int = None)
but this would be treated as
   f(a : Optional[int] = None)

--
components: Library (Lib)
files: test.py
messages: 255864
nosy: Dhruv Rajvanshi
priority: normal
severity: normal
status: open
title: Default argument values with type hints break type correctness
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file41238/test.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com